-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature request: detect if identifiers from autoload-dev are used #29
Comments
I really like this idea. After thinking it through for a bit, I suggest approaching it as follows: Create a new implementation of DependencyGuardInterface, DevDependencyGuard. Create a third implementation, DependencyGuardChain. If it so happens that this causes an alarming number of duplicate analysis calls, think about creating a symbol context that can be passed to both implementations and elevates analysis from one implementation to the next. @willemstuursma, are you willing to implement this? I can't make any promises on clearing my schedule any time soon. |
@johmanx10 I will discuss internally and report back. |
@johmanx10 can you give me some pointers on how we could add this functionality? |
Okay @willemstuursma , so I have been reading your issue more carefully and dove into the code for a bit. There is a class called Then, now you've found this point of entry, you would want to create a list of files that are autoloaded because of the $autoloadGenerator->setDevMode(false); That value, Please be aware that if directives in I hope this was helpful to you :) |
Thanks @johmanx10. We're going to try to create an implementation for this with my team at Mollie. I expect it to be picked up somewhere between next week - end of this year. |
Thanks in advance for the contribution! There are currently two pull requests actively trying to patch bugs. In regards with release planning, I'm looking to get those two merged ASAP, but at least before a new feature is introduced. Since developer availability tends to be pretty low at the end of the year; please understand that this release might happen as the first thing we do in 2019, depending on how things go. |
It would be great if this package could detect usages of classes from
autoload-dev
in regular code, just like it detects usage from dependencies.For example, we have some base tests / testing traits we load using
autoload-dev
incomposer.json
. Of course we want to be alerted when these are used accidentally in production code.The text was updated successfully, but these errors were encountered: