Skip to content

Conversation

@tsluyter
Copy link

The current version of php-di (6.4) has a number of deprecated features and usages which lead to errors in Slim-Skeleton.

For example, running Slim-Skeleton with PHP 8.3 gives the following trace:


Deprecated: DI\create(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/functions.php on line 35

Deprecated: DI\autowire(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/functions.php on line 48

Deprecated: DI\ContainerBuilder::writeProxiesToFile(): Implicitly marking parameter $proxyDirectory as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/ContainerBuilder.php on line 283

Deprecated: DI\Definition\Helper\CreateDefinitionHelper::__construct(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Helper/CreateDefinitionHelper.php on line 56

Deprecated: DI\Definition\Source\ReflectionBasedAutowiring::autowire(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Source/ReflectionBasedAutowiring.php on line 19

Deprecated: DI\Definition\Source\Autowiring::autowire(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Source/Autowiring.php on line 23

Deprecated: DI\Definition\Source\DefinitionArray::__construct(): Implicitly marking parameter $autowiring as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Source/DefinitionArray.php on line 39

Deprecated: DI\Definition\Source\DefinitionNormalizer::normalizeRootDefinition(): Implicitly marking parameter $wildcardsReplacements as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Source/DefinitionNormalizer.php on line 46

Deprecated: DI\Proxy\ProxyFactory::__construct(): Implicitly marking parameter $proxyDirectory as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Proxy/ProxyFactory.php on line 43

Deprecated: DI\Container::__construct(): Implicitly marking parameter $definitionSource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Container.php on line 97

Deprecated: DI\Container::__construct(): Implicitly marking parameter $proxyFactory as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Container.php on line 97

Deprecated: DI\Container::__construct(): Implicitly marking parameter $wrapperContainer as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Container.php on line 97

Deprecated: DI\Definition\ObjectDefinition::__construct(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/ObjectDefinition.php on line 72

Deprecated: DI\Definition\ObjectDefinition::setClassName(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/ObjectDefinition.php on line 88

Deprecated: DI\Definition\ObjectDefinition::setLazy(): Implicitly marking parameter $lazy as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/ObjectDefinition.php on line 186

Deprecated: DI\Definition\Resolver\ObjectCreator::setPrivatePropertyValue(): Implicitly marking parameter $className as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php on line 212

Deprecated: DI\Definition\Resolver\ParameterResolver::resolveParameters(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Resolver/ParameterResolver.php on line 38

Deprecated: DI\Definition\Resolver\ParameterResolver::resolveParameters(): Implicitly marking parameter $method as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/php-di/php-di/src/Definition/Resolver/ParameterResolver.php on line 38
Hello world!{ "statusCode": 500, "error": { "type": "SERVER_ERROR", "description": "FATAL ERROR: DI\\Definition\\Resolver\\ParameterResolver::resolveParameters(): Implicitly marking parameter $method as nullable is deprecated, the explicit nullable type must be used instead. on line 38 in file \/var\/www\/vendor\/php-di\/php-di\/src\/Definition\/Resolver\/ParameterResolver.php." } }

Upgrading php-di from 6.4 to 7.0 gets rid of all deprecation warnings.

The current version of php-di (6.4) has a number of deprecated features and usages which lead to errors in Slim-Skeleton.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant