-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Move loadInstalledPaths from init to onDependenciesChangedEvent #51
Conversation
The failing build on Travis is caused by an issue with the security-checker. It uses code that is only PHP7.1+ compatible. |
I've tagged security checker to the last release that supported PHP 5, and the Travis build is now successful. Would it be better (and possible) to manage the version of security-checker via |
This seems to be a sane fix for the issue at hand. I will test this one asap. |
@gapple About the security checker as a dependency, I'm kinda in the middle of this. So I'm fine with both solutions tbh. |
Proposed Changes
The plugin executes
phpcs
when initialized, which may cause it to include the autoloader while it's in an inconsistent state.For example, if a package that includes a static file is removed during an update (e.g. a compat library that provides global PHP functions):
This PR moves the initialization of
installedPaths
to the method which responds to thePOST_INSTALL_CMD
andPOST_UPDATES_CMD
events, so that it is only initialized just before it's actually needed.Related Issues
Fixes #49