Skip to content
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

The composer plugin implementation seems to be breaking the composer lifecycle #49

Closed
dalibor-matura opened this issue Jun 1, 2018 · 6 comments

Comments

@dalibor-matura
Copy link

Problem

The dealerdirect/phpcodesniffer-composer-installer version 0.4.4 (currently latest version) is probably breaking composer lifecycle.

Here is a link to composer issue: composer/composer#7298 (comment) 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 composer/composer#7298, mainly the comment composer/composer#7298 (comment), it contains all the details I was able to collect.

Expected behaviour

The composer update or composer 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).

@dalibor-matura
Copy link
Author

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

@stof
Copy link

stof commented Jul 10, 2018

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)

@jrfnl
Copy link
Member

jrfnl commented Sep 7, 2018

Looks like PR #51 addresses this issue.

@kenorb
Copy link

kenorb commented Sep 7, 2018

Related GH-48

@dalibor-matura
Copy link
Author

dalibor-matura commented Oct 11, 2018

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

@frenck
Copy link
Contributor

frenck commented Oct 25, 2018

Merged in #51, I'll consider a release within the next couple of days (some cleanup on this repo in progress).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants