Exemple
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
sha256:6656d05765ce95a36ec3ba27e1ee3a5d19e07d174e99b805e672f96f310e2bd0
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- 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 HOW
- Paquets
- nesbot/carbon 3.11.3
- Environnement
- php
- Créé
- 2026-08-16T08:49:56Z
Contrat
- assert Carbon::mixin registers methods declaring : Closure return type hint as macros
- assert CarbonImmutable::mixin registers methods declaring : Closure return type hint as macros
- assert invoking : Closure macro on Carbon instance mutates and returns Carbon instance
- assert invoking : Closure macro on CarbonImmutable instance returns new instance without mutating original
- assert mixin methods declaring : callable return type hint are registered and callable
- assert untyped mixin methods are registered and callable
- assert non-callable helper methods returning primitive types like : int or : string are excluded from macro registration
Fichiers
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/CustomDateMixin.php
- test/contract.php
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9