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

Cross bin confusion with phpcs and dealerdirect/phpcodesniffer-composer-installer #48

Closed
barraponto opened this issue Dec 4, 2019 · 3 comments

Comments

@barraponto
Copy link

So, having composer bin install phpcs with Wordpress standards works just fine:

$ composer global bin wordpress require squizlabs/php_codesniffer wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer
$ phpcs -i
## The installed coding standards are Squiz, PSR1, PEAR, PSR12, Zend, PSR2, MySource, WordPress-Core, WordPress-Extra, WordPress and WordPress-Docs

However, once phpcs and Drupal standards are installed to a different bin, phpcs stops seeing all custom standards

$ composer global bin drupal require squizlabs/php_codesniffer drupal/coder dealerdirect/phpcodesniffer-composer-installer
$ phpcs -i
## The installed coding standards are Squiz, PSR1, PEAR, PSR12, Zend, PSR2 and MySource

Not sure whether it's an issue with composer-bin-plugin or dealerdirect/phpcodesniffer-composer-installer or both.

@theofidry
Copy link
Collaborator

I think this is happening because both provides a phpcs bin, hence there is a conflict and the plugin cannot tell which one to pick

@barraponto
Copy link
Author

yeah, that's likely it. although the linked executable is from the first bin.

@theofidry
Copy link
Collaborator

Clarified this behaviour in https://github.com/bamarni/composer-bin-plugin#disable-links. Will be closing this now :)

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

No branches or pull requests

2 participants