Open GarciaSiego opened 9 months ago
Wait, is PHP actually making specifying types mandatory? In a minor version? With a hacky commented out attribute to avoid the warning?
Will argument types become mandatory too?
Simple tag seems to fix it https://github.com/Athari/YaLinqo/pull/63
This SO post explains the reasoning quite well. Because they now specify the return type of IteratorAggregate::getIterator()
, you now also need to specify the return type on your Enumerable::getIterator()
. Rather than instantly break tonnes of older code by specifying return types on built-in classes, they added the #[TentativeType]
attribute to give people time to update by causing the deprecation message rather than a straight error.
Getting following error on php 8.2 Package: "athari/yalinqo": "^2.5",
[message] => Return type of YaLinqo\Enumerable::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [file] => /var/www/html/custom/vendor/athari/yalinqo/YaLinqo/Enumerable.php