Skip to content

Implicitly nullable parameters are deprecated #19078

Open
@remco-pc

Description

@remco-pc

Description

The following code:

<?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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions