Running the tests on php 8.1 gives deprecations like so
$ ./vendor/bin/phpunit test
PHPUnit 9.5.13 by Sebastian Bergmann and contributors.
PHP Deprecated: Return type of Amp\Injector\Definitions::getIterator(): iterable should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /amphp/injector/src/Definitions.php on line 35
.
Deprecated: Return type of Amp\Injector\Definitions::getIterator(): iterable should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /amphp/injector/src/Definitions.php on line 35
......PHP Deprecated: Return type of Amp\Injector\Container::getIterator(): iterable should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /amphp/injector/src/Container.php on line 20
.
Deprecated: Return type of Amp\Injector\Container::getIterator(): iterable should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /amphp/injector/src/Container.php on line 20
............................ 36 / 36 (100%)
Time: 00:00.268, Memory: 6.00 MB
OK (36 tests, 59 assertions)
If you want to keep return type as iterable maybe with a new method?
Running the tests on php 8.1 gives deprecations like so
If you want to keep return type as
iterable
maybe with a new method?