-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] Namespace use s #44417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for your report @ivansrdic and your ping @nicolas-grekas. |
@Korbeil |
The failing test is not related to the PR, I'm just waiting for someone to review / merge the pull request. |
This PR was merged into the 5.4 branch. Discussion ---------- [PropertyInfo] Fix aliased namespace matching | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #44417 | License | MIT | Doc PR | N/A When you have an aliased namespace that you use in your code it was erroring because we didn't stored the first part of the namespace that should be replaced. Commits ------- 432b1a1 Fix aliased namespaces matching
Symfony version(s) affected
5.4.0,6.0.0
Description
If we have a class which has
use
statements which use a namespace instead of a class/interface,\Symfony\Component\PropertyInfo\PhpStan\NameScope::resolveStringName
throws an exception.How to reproduce
run
bin/console cache:clear
and you will get an exception like thisPossible Solution
I think there is a mistake in logic in
\Symfony\Component\PropertyInfo\PhpStan\NameScope::resolveStringName
, lines 48 and 50. Thearray_shift
call is correct, but we need it's output because that's the value by which the uses are indexed in$this->uses
Changing those two lines to
Additional Context
No response
The text was updated successfully, but these errors were encountered: