Sylius version affected: 1.7.0
Description
Hi everyone,
Today I tried to upgrade my Sylius version to 1.7.0 (from 1.6.4)
Everything was fine until I got this issue at the end of symfony cache:clear command :
"Attempted to call an undefined method named "getType" of class "phpDocument or\Reflection\DocBlock\Tags\InvalidTag"
After digging, I found that this error was generated by this bundle :
symfony/property-info (v4.4.5)
After digging again, I found this line in Sylius Core :
https://github.com/Sylius/Sylius/blob/90fd5eb6b92e172f43703e8f5c3d2a76f4da2e3b/src/Sylius/Component/User/Model/User.php#L101
And after removed it, no more error message ...
What do you think ?
Thank you guys.
Steps to reproduce
Hey guys,
We're having the same thing while upgrading to sylius 1.7.0 too.
At first we had other bugs related to other Iterablesymfony/property-info, phpdocumentor/type-resolver and phpdocumentor/reflection-docblock).
Then we're facing this exact problem, but it seems to me it's more a problem of the regular @var of the $oauthAccounts property which uses the pseudo-type array-key which is "un-resolvable" for symfony/property-info (as it understands this one as a relative class identifier).
But, and that's what I call anticipation, the problem is already solved in master thanks to this commit : https://github.com/Sylius/Sylius/commit/90fd5eb6b92e172f43703e8f5c3d2a76f4da2e3b
Here the array-key type is used in a @psalm-var annotation instead of a classic one. Juste tried to run our whole test suite using this commit of sylius/sylius and the problem was gone.
Can you confirm this @pchauvelin?
I'd do my best to have this patch version released by Monday 馃帀
All's good for me
Thanks @pamil !
I came across this issue as well in a non-Sylius project. This is a related issue:
https://github.com/symfony/symfony/issues/36049
Most helpful comment
I'd do my best to have this patch version released by Monday 馃帀