-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Extend Reflection to expose import statements #14085
Comments
Hi @Korbeil! This information is not readily available at runtime. The |
Hey @iluuu1994, thanks for your feedback. |
related with #8782 |
There has not been any recent activity in this feature request. It will automatically be closed in 14 days if no further action is taken. Please see https://github.com/probot/stale#is-closing-stale-issues-really-a-good-idea to understand why we auto-close stale feature requests. |
There has not been any recent activity in this feature request. It will automatically be closed in 14 days if no further action is taken. Please see https://github.com/probot/stale#is-closing-stale-issues-really-a-good-idea to understand why we auto-close stale feature requests. |
Hey,
Nowadays there is a limit when trying to resolve a type from a phpDoc in PHP, you'll need to get a "context" for the file where the type as been written. Let's make an exemple with a
use
import combined with theas
keyword:Another example, you have two classes with the same name but in different namespaces:
App\Foo
andApp\Command\Foo
Considering both theses example, we require to parse the whole file to check for
use
import statements so we can have context for the phpDoc types within this file.To solve this issue with Reflection, it would require:
ReflectionFile
an object that describe the content of a file: a list ofReflectionImport
and any other stuff within that file (ReflectionClass
...)ReflectionImport
an object that describe a use statement with a linkedReflectionClass
and a local alias when requiredI chosed to not use the keyword
use
within Reflection here because I think it's too much missleading andimport
has more meaning in that context.The text was updated successfully, but these errors were encountered: