You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a version bump of dependencies in a Symfony project I noticed that since December symfony/type-info throws an InvalidArgumentException when it faces a mixed key type (see update here).
I ended up at ApiPlatform\Metadata\Util\PropertyInfoToTypeInfoHelper::createTypeFromLegacyValues(). At some point it does the following:
Can anyone help me wrap my head around why this is, and if I understand it right, why a mixed type is returned in every scenario, since $collectionKeyTypes is always an array?
Fixing such annotations in now a big deal, I'm more interesed in the whys:)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
After a version bump of dependencies in a Symfony project I noticed that since December
symfony/type-infothrows anInvalidArgumentExceptionwhen it faces amixedkey type (see update here).I ended up at
ApiPlatform\Metadata\Util\PropertyInfoToTypeInfoHelper::createTypeFromLegacyValues(). At some point it does the following:Because of this, PHPDoc annotations like so throw an error in entities:
Can anyone help me wrap my head around why this is, and if I understand it right, why a mixed type is returned in every scenario, since
$collectionKeyTypesis always an array?Fixing such annotations in now a big deal, I'm more interesed in the whys:)
Beta Was this translation helpful? Give feedback.
All reactions