Closed Ayesh closed 2 days ago
This library is used by @theofidry's php-scoper
tool which is used in the release process of PHPUnit.
When I use php-scoper
with PHP 8.4 then I get
PHP Fatal error: Uncaught ErrorException: _HumbugBoxf238c5c0abfa\Safe\gmdate(): Implicitly marking parameter $timestamp as nullable is deprecated, the explicit nullable type must be used instead in phar:///usr/local/src/phpunit/tools/php-scoper/vendor/thecodingmachine/safe/deprecated/datetime.php:6
There must be an error handler, either in this library or in php-scoper
, that escalates the deprecation to a fatal error.
TL;DR: As of right, I cannot release new versions of PHPUnit using PHP 8.4 due to this library not being compatible with PHP 8.4.
@sebastianbergmann @theofidry looking at thecodingmachine/safe repo I can't see a error handler.
since PHPUnit got new releases I guess this problem got somehow fixed for you?
since PHPUnit got new releases I guess this problem got somehow fixed for you?
I downgraded PHP to roll the release of PHPUnit 11.4.4.
PHP 8.4 recently merged changes to emit a deprecation notice on function declared with an implicit nullable type.
All upstream functions in php-src already have the nullable types (
?string $var = null
and notstring $var = null
), so we will need to update our generator to account for this.I submitted PR #441 to preview the expected changes.