[php-src] Issue #19078: Implicitly nullable parameters are deprecated

From: Date: Wed, 09 Jul 2025 06:35:32 +0000
Subject: [php-src] Issue #19078: Implicitly nullable parameters are deprecated
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250398@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19078 Author: remco-pc ### Description The following code: ```php <?php echo 'create entity2 class' . PHP_EOL; d(Database::config($object)); echo 'strange' . PHP_EOL; d(Build::entity( $object, $options['class'], $options['role'], $options['node'] )); echo 'stranger' . PHP_EOL; ``` Resulted in this output: ``` create entity2 class /Application/Mount/Shared/Event/Raxon/Doctrine/Schema.php:116 object(Doctrine\ORM\Configuration)#2494 (7) { ... } strange ``` But I expected this output instead: ``` create entity2 class /Application/Mount/Shared/Event/Raxon/Doctrine/Schema.php:116 object(Doctrine\ORM\Configuration)#2494 (7) { ... } strange stranger; ``` It seems that i had another function in Build with some parameters which where deprecated in php 8.4 "Implicitly nullable parameters are deprecated" When i fix that error, it works again. I don't get a warning in the terminal (the deprecations), it just stops executing at that call build. My error reporting is like that every error becomes an exception it would be echoed but it doesn't. Why is this even a thing and make nullable explicit at both sides of the variable object|null $connection=null? ### PHP Version ```plain PHP 8.4.10 (cli) (built: Jul 3 2025 12:45:15) (NTS) Copyright (c) The PHP Group Built by Debian Zend Engine v4.4.10, Copyright (c) Zend Technologies with Zend OPcache v8.4.10, Copyright (c), by Zend Technologies ``` ### Operating System Debian 12

« previous php.bugs (#250398) next »