-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Can't properly determine Object_'s name without context #236
Comments
Hi, Thanks for your report. Can you please explain what you are trying to achieve? The context is critical for this library as it tells us the imports that are done in a file. The notation This behavior is qual to what PHP expects from the code. I hope this makes things a bit clearer for you. If you could elaborate on your use case I can have a look at how we can support this. |
Well, my main point was about separation of concerns. Or in other words, I'm talking literally about parsing just DocBlock independently from where it is. I'm currently myself out-of-context a bit (that was almost 2 moths ago already), but I'll try to revise what I had there and why it was a bit redundant for me to pass the context. But in general the case was what I described: I needed to parse just the DocBlock syntatically. And the "context" was taken into account higher in my code hierarchy. And when doing this, I wanted to get original |
Consider such PhpDoc comment as an example:
When parsing this, I will have two
Object_
's, one forDocBlock\Tags\Var_
, second for\My\Super\Class
. The problem is that if I have no context,(string) $object->getFqsen()
will return them both with leading slash:While
$type->getFqsen()->getName()
will return just the last part of the name for both of them:Meaning, that I can't get the original form of the reference without specifying the context, which I don't actually want to, cause it is redundant in my case.
The text was updated successfully, but these errors were encountered: