Server error when the server starts first time

Hello, i’m new in Slim Framework and i have a question about the slim-skeleton template/base project and the dependencies.

When i start the app in local env, the first request always throw a server error by default error handler, but it isn’t a pure exception, it’s a warning by problems by things how
Implicitly marking parameter $className as nullable, parameters, vars, etc., and from the second request until i close the server, those class of exceptions aren’t throwed anymore. So, the problem is why it happens the first time and i can do something to fix it? and of course why is the reason of it?

For now, i’ve noticed this starts by the php-di component, for example:

{
    "statusCode": 500,
    "error": {
        "type": "SERVER_ERROR",
        "description": "ERROR: DI\\Definition\\Resolver\\ObjectCreator::setPrivatePropertyValue(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead on line 212 in file C:\\Users\\user\\\Desktop\\Development\\PHP\\myapp\\vendor\\php-di\\php-di\\src\\Definition\\Resolver\\ObjectCreator.php."
    }
}

Out of curiosity, if I fix it, then other error is showed in the next shutdown/turn on server test. This isn’t a critical problem for me in dev enviroment, because i can retry other request and the problem disappears, but i don’t think that is correct.

What can i do?

Thanks for reading

PHP version 8.5.8
slim/slim 4.15.3
slim/psr7 1.8
php-di/php-di: ^6.4,

You should update PHP-DI to version 7.

That works, i didn’t think of it, first time using a DI lib.

Thank you for your help.