-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Property info cannot resolve trait namespace #34191
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
Labels
Bug
Help wanted
Issues and PRs which are looking for volunteers to complete them.
PropertyInfo
Status: Needs Review
Comments
Hey, thanks for your report! |
Yes, still relevant. As a temporary solution I use fullnamespace.. |
Same problem here. Please fix this. |
I'm adding the "Help wanted" label. |
Can you confirm that #40175 fixes this? |
fabpot
added a commit
that referenced
this issue
Feb 16, 2021
…ed in traits (xabbuh) This PR was merged into the 4.4 branch. Discussion ---------- [PropertyInfo] use the right context for properties defined in traits | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #28732, #34191 | License | MIT | Doc PR | Commits ------- 1572491 use the right context for properties defined in traits
nicolas-grekas
added a commit
that referenced
this issue
Apr 14, 2021
…n traits (colinodell) This PR was merged into the 4.4 branch. Discussion ---------- [PropertyInfo] Use the right context for methods defined in traits | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34191 | License | MIT | Doc PR | Pull request #40175 only partially fixed #34191 - it solved the problem for properties used in traits but it did not address the same issue with methods. I have therefore applied the same style of fix and confirmed it works properly with tests. Commits ------- c7e9493 [PropertyInfo] Use the right context for methods defined in traits
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
Help wanted
Issues and PRs which are looking for volunteers to complete them.
PropertyInfo
Status: Needs Review
Symfony version(s) affected: 4.3.5
Description
Hello, I have encountered with problem deserializing object, and eventually pointed to property-info, that my trait exists elsewhere than class itself. It seems
that
getPhpTypeAndClass
is too simple for traits (?).How to reproduce
Possible Solution
It seems that another library have already resolved this issue, you can take a look and this one
Additional context


as you can see structure passed to https://github.com/phpDocumentor/ReflectionDocBlock/blob/4.3.2/src/DocBlockFactory.php#L73 within
$context
variablegives https://github.com/symfony/property-info/blob/v4.3.5/Extractor/PhpDocExtractor.php#L150
The text was updated successfully, but these errors were encountered: