Closed dalibor-matura closed 6 years ago
This is still causing me problems on a couple of projects I'm working on.
Please, check out how it can be fixed or discuss a possible solution with composer maintainer (Jordi Boggiano).
Thanks a lot, Dalibor
the culprit is https://github.com/Dealerdirect/phpcodesniffer-composer-installer/blob/2e41850d5f7797cbb1af7b030d245b3b24e63a08/src/Plugin.php#L121 which is running phpcs when initializing the plugin, and so expects the vendor folder to be in a working state at that time, including the dumped autoloader (which is not guaranteed at all by composer, almost the opposite)
Looks like PR #51 addresses this issue.
Related GH-48
In order to use the fix from PR #51 commited to master
branch, it would be good to get a new stable release.
Some of us needs to update the package with composer and latest master-dev is not allowed by restrictions of other dependent packages.
I've created a new issue with a request of new stable release #60
Merged in #51, I'll consider a release within the next couple of days (some cleanup on this repo in progress).
Problem
The
dealerdirect/phpcodesniffer-composer-installer
version0.4.4
(currently latest version) is probably breaking composer lifecycle.Here is a link to composer issue: https://github.com/composer/composer/issues/7298#issuecomment-393796348 where the Jordi Boggiano (the author of composer) and I have come to a conclusion that there may be a bug in this package.
Please, read the issue https://github.com/composer/composer/issues/7298, mainly the comment https://github.com/composer/composer/issues/7298#issuecomment-393796348, it contains all the details I was able to collect.
Expected behaviour
The
composer update
orcomposer require
should not crash in the custom installer implemented by this package while trying to use autoloader that is not yet regenerated and is in a stale state (not updated yet).