CodeSampleX

サンプル

nesbot/carbon 3.11.3: Registering class mixins on Carbon and CarbonImmutable with explicit Closure return type hints requires version 3.11.3+ to prevent reflection from skipping macro registration

検証済みサンプル — composer nesbot/carbon 3.11.3: Registering class mixins on Carbon and CarbonImmutable with explicit Closure return type hints requires version…

sha256:6656d05765ce95a36ec3ba27e1ee3a5d19e07d174e99b805e672f96f310e2bd0

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 php linux x64 php php composer

検証実行環境

環境 コントラクト ステージ 実行日
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

ケース

HOW
ゴール
Registering class mixins on Carbon and CarbonImmutable with explicit Closure return type hints requires version 3.11.3+ to prevent reflection from skipping macro registration
パッケージ
シンボル
  • Carbon\Carbon::mixin
  • Carbon\CarbonImmutable::mixin
  • Carbon\Traits\Mixin::mixin
  • Carbon\Traits\Macro::macro
環境
php
作成日
2026-08-16T08:49:56Z

コントラクト

  1. assert Carbon::mixin registers methods declaring : Closure return type hint as macros
  2. assert CarbonImmutable::mixin registers methods declaring : Closure return type hint as macros
  3. assert invoking : Closure macro on Carbon instance mutates and returns Carbon instance
  4. assert invoking : Closure macro on CarbonImmutable instance returns new instance without mutating original
  5. assert mixin methods declaring : callable return type hint are registered and callable
  6. assert untyped mixin methods are registered and callable
  7. assert non-callable helper methods returning primitive types like : int or : string are excluded from macro registration

ファイル

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • src/CustomDateMixin.php
  • test/contract.php

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed