Closed xkzl closed 2 years ago
Isn't #[\ReturnTypeWillChange]
enough?
I get dozen of warnings right now with using PHP 8.1.
In my understanding, MetadataBag is not the player in charge of the return type, but "ArrayAccess". So it should just be updated accordingly. Unless I missed something.
I get dozen of warnings right now with using PHP 8.1.
Do you have the #[\ReturnTypeWillChange]
attribute in your code?
I get dozen of warnings right now with using PHP 8.1.
I was not able to reproduce that. Are you using the dev-develop
version or 1.2.4
?
You need a combination of #[\ReturnTypeWillChange]
to silence the PHP engine deprecations and a @return
annotation to silence the deprecations coming from Symfony's debug class loader.
Adding the native return types is a B/C break in an open class, and as is breaks PHP 7 support with the mixed type.
Edit: #814 is actually the right fix for Imagine's current operating environment.