-
Notifications
You must be signed in to change notification settings - Fork 136
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
Support for file, function and superglobal tokens #634
Conversation
Tons of work! I don't understand all of the changes but I'm excited for the high-level concepts. Thank you!! |
Thanks a lot, @patrickkusebauch. I like the direction this is taking. Happy to merge this 👍 |
- `class` (default) - analyzes class definitions for everything apart from superglobal usage. | ||
- `class_superglobal` - analyzes class definitions for superglobal usage. | ||
- `use` (default) - analyzes file definitions for use statements. | ||
- `file` - analyzes file for everything apart from use statements and function/class definitions. | ||
- `function` - analyzes function definitions for everything apart from superglobal usage. | ||
- `function_superglobal` - analyzes function definitions for superglobal usage. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering about this paragraph.. doesn't it mean is only possible to scan for superglobals within functions or classes, but not in plain php files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, no. See https://github.com/qossmic/deptrac/blob/main/tests/DependencyEmitter/FileDependencyEmitterTest.php#L37. I recall that I differentiated class_superglobal
as not to break current behavior.
function_superglobal
- I am not that sure about it. I think function
support was implemented in a previous commit, so the same reasoning? I don't recall honestly.
Task-list:
In a separate PRs, I would suggest the following:
debug:class
is kind of meaningless right now)Closes: #331
Closes: #473
Closes: #582
Closes: #594