box-project / box2

An application for building and managing Phars.
https://box-project.github.io/box2/
MIT License
1.19k stars 80 forks source link

Fix the composer autoloader location for cgr #164

Open mikeSimonson opened 7 years ago

mikeSimonson commented 7 years ago

There is a tool called cgr (for composer global require) that install every tool that needs to be globaly available in their own custom folder. It does so that each tool dependecy don't infuences other tools dependencies.

This means that the logic that was previously used by the autoloader location code for box is broken. For some reason the code used to look for the last autoloader in the folder structure ( the one closest to the root folder ). I have no idea why it was doing so.

For cgr to work it needs to be the first one found that needs to be used. I have changed the logic accordingly in this PR as well as removed some dead code (an option that was never used).

Any comment ?

theofidry commented 7 years ago

Ping @kherge: this actually makes much more sense as you're likely to want the first vendor (which 99% will be your project one) and not the most global one.

theofidry commented 6 years ago

@mikeSimonson see https://github.com/humbug/box/pull/3

mikeSimonson commented 6 years ago

@theofidry Thanks. Is humbug fork the main repo now ?

theofidry commented 6 years ago

@mikeSimonson yeah. Well at least I'm working on it as I couldn't get hold on Keven Herrera to access to this one