샘플
Handle Carbon 3 boundary changes: createFromTimestamp defaulting to UTC instead of PHP default timezone, diffIn* methods returning signed floats instead of truncated ints, and defensive cloning in setTestNow and CarbonPeriod
sha256:47ad96c01f4db70a9c296c77382c1ea8912e07f9c4393b1da0a86fdb0c0d1e45
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle Carbon 3 boundary changes: createFromTimestamp defaulting to UTC instead of PHP default timezone, diffIn* methods returning signed floats instead of truncated ints, and defensive cloning in setTestNow and CarbonPeriod HOW
- 패키지
- nesbot/carbon 3.13.2
- 환경
- php
- 생성일
- 2026-08-16T08:46:23Z
컨트랙트
- Carbon::createFromTimestamp() defaults strictly to UTC (+00:00) rather than inheriting date_default_timezone_get(), shifting local wall-clock hours unless timezone is explicitly specified
- diffInDays(), diffInMinutes(), and diffInSeconds() return float values with fractional precision (e.g. 18 hours = 0.75 days, 45 seconds = 0.75 minutes) rather than integer-truncated 0 values
- diffIn* without absolute flag returns signed negative floats when comparing against earlier timestamps
- Carbon::setTestNow() defensively clones the mock date argument, preventing subsequent in-place mutations on the original date variable from altering the active test clock
- CarbonPeriod::getStartDate() returns a protected date instance whose external mutation does not alter the period boundary
- Carbon::minValue() and Carbon::maxValue() are removed and throw UnknownMethodException
파일
- 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