Repository navigation
Conversation
PHP 8.6 gives DateTimeImmutable::add(), sub(), modify(), setDate(), setISODate(), setTime(), setTimestamp(), setTimezone() and createFromInterface() a tentative static return type. Safe's overrides return self, so declaring the class emits nine deprecation notices. Mark them #[\ReturnTypeWillChange], as createFromMutable() and __set_state() already are.
|
The failing checks here are not caused by this branch: PHPStan fails the same way on a clean Running the repo's own
This branch produces the same set, with the Since the three What this branch does fix, measured on
At One note on |
PHP 8.6 gives several
DateTimeImmutablemethods a tentativestaticreturn type.Safe\DateTimeImmutableoverrides them withself, so loading the class on 8.6 emits nine deprecation notices, for example:This marks
add(),sub(),modify(),setDate(),setISODate(),setTime(),setTimestamp(),setTimezone()andcreateFromInterface()with#[\ReturnTypeWillChange], ascreateFromMutable()and__set_state()already are.The new test loads the class in a separate process and asserts no deprecation is raised. It fails on 8.6.0-dev without the change. The full suite passes on PHP 8.1 to 8.6.