Skip to content

#70 look for further vendor/autoload.php locations to support in-project-dev-dependency installations #71

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

Merged
merged 2 commits into from
May 27, 2018

Conversation

Ocramius
Copy link
Member

Closes #70

I was trying to find a way to test this via .travis.yml, but the problem is that I'd need to add a composer vcs repository and then use a HEAD reference with some ugly hacks that will break everything, so I'd probably skip that for now.

@ciaranmcnulty can you please review this one? Use ?w=1 :-)

@Ocramius Ocramius added the bug label May 27, 2018
@Ocramius Ocramius added this to the 1.0.1 milestone May 27, 2018
@Ocramius Ocramius self-assigned this May 27, 2018
@Ocramius Ocramius requested a review from asgrim May 27, 2018 10:32
/** @noinspection PhpIncludeInspection */
require_once $autoload;

return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an argument for not breaking when the first one is found, depending what use cases you want to support.

If I build a PHAR or do a composer global require, or any other method where the tool has its own deps locally then I need to include both the tool's autoloader and the project's autoloader

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait this might not apply in your case if you're not depending on project reps being loaded

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to include both the tool's autoloader and the project's autoloader

This can happen when using classes from this project directly, but not with the bin/roave-backward-compatibility-check.php, which is closed for customisation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean...

I mean does this tool need to autoload target project's classes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it doesn't, but you can use classes from this tool in your own project

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK then it's sufficient to find 'our' autoloader 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then 🚢

Lemme finish this 🍺 and I'll release

@Ocramius Ocramius merged commit 81b816e into master May 27, 2018
@Ocramius Ocramius deleted the fix/#70-autoload-when-not-in-project branch May 27, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants