샘플
Configure month and year overflow arithmetic, serialization format, and strict mode via instance settings and Factory without global state pollution
sha256:35ee9807418d9df3e02082501c04725aa7aa794a0770181d368e7cc1f492f8d6
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Configure month and year overflow arithmetic, serialization format, and strict mode via instance settings and Factory without global state pollution HOW
- 패키지
- nesbot/carbon 3.13.2
- 환경
- php
- 생성일
- 2026-08-16T08:46:44Z
컨트랙트
- Adding 1 month to Jan 31 or subtracting 1 month from Mar 31 defaults to March 2/3 due to month overflow
- Carbon::useMonthsOverflow(false) and useYearsOverflow(false) globally clamp arithmetic but leak across requests
- Calling ->settings() directly mutates CarbonImmutable instances in place; ->copy()->settings() is required for immutability
- Carbon\Factory isolates month/year overflow, locale, timezone, and JSON serialization without polluting global static state
- Carbon 3 enables strict mode by default, throwing InvalidFormatException and InvalidDateException instead of returning null
파일
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9