-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: detect the auto-loader of the project you're installed in #91
Conversation
Relative to roave/backward-compatibility-check/bin/ Visible if installed using composer-bin.
@dkarlovi what do you mean by |
etc. |
You shouldn't need to |
If you're using Composer bin plugin (directly or indirectly, like in referenced issue), it breaks. |
This was just a reproducer, I'm not using it like that at all, it's installed in a Docker image used as a portable QA/tooling environment. It still can't rely on my project's autoloader, it needs to use its own, as here. |
@asgrim this one is actually faulty since it loads an autoloader based on where in the filesystem you are. Roll a dice, load an autoloader! :)
|
I'm closing this one as "won't fix" because of this:
As much as I like supporting various use-cases, supporting plugins that move things around is not in my interest. I've already previously denied similar patches (in other projects) for people that use the As for the |
Fair, but in that case you should probably remove all the auto-loader paths except the one you support as a use case. You can even remove the whole autoloader heuristic, come to think about it. 👍 |
@dkarlovi currently removing all paths that are not in the pre-determined locations |
Note: manually merged this patch anyway, but the path is a replacement for existing ones, not an additional one 👍 |
As per discussion in #91 (comment) (#91), the autoloader is in a fixed position, relative to the executable entry-point, so a `getcwd()` is unnecessary, and can actually lead to loading the wrong composer autoloader, which in turn may lead to loading analysed files, which is exactly what we want to avoid.
Included in #94 |
As per discussion in Roave/BackwardCompatibilityCheck#91 (comment) (#91), the autoloader is in a fixed position, relative to the executable entry-point, so a `getcwd()` is unnecessary, and can actually lead to loading the wrong composer autoloader, which in turn may lead to loading analysed files, which is exactly what we want to avoid.
Relative to
roave/backward-compatibility-check/bin/
Visible if installed using
composer-bin
.