martin-hughes / auryn

IoC Dependency Injector
MIT License
6 stars 1 forks source link

Deprecation warnings in PHP8.4 #4

Open martin-hughes opened 4 days ago

martin-hughes commented 4 days ago

Need to fix PHP8.4 deprecation warnings for implicitly marking a parameter as nullable in the following places:

From a brief glance, it looks like the obvious fix of making them explicitly nullable shouldn't cause any compatibility issues.

Raw dockerized_tests.sh output is as follows:

Deprecated: Auryn\Test\NonConcreteDependencyWithDefaultValue::__construct(): Implicitly marking parameter $i as nullable is deprecated, the explicit nullable type must be used instead in /code/test/fixtures.php on line 513

Deprecated: Auryn\Test\ConcreteDependencyWithDefaultValue::__construct(): Implicitly marking parameter $instance as nullable is deprecated, the explicit nullable type must be used instead in /code/test/fixtures.php on line 523
PHPUnit 9.6.20 by Sebastian Bergmann and contributors.

Warning:       No code coverage driver available

.
Deprecated: Auryn\Injector::__construct(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /code/lib/Injector.php on line 51

Deprecated: Auryn\CachingReflector::__construct(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /code/lib/CachingReflector.php on line 16

Deprecated: Auryn\CachingReflector::__construct(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead in /code/lib/CachingReflector.php on line 16
......
Deprecated: Auryn\InjectionException::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead in /code/lib/InjectionException.php on line 9

Deprecated: Auryn\InjectionException::fromInvalidCallable(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead in /code/lib/InjectionException.php on line 20