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

composer-plugin-api should not be alphabetized as a dependency #673

Closed
danepowell opened this issue Jan 29, 2021 · 1 comment · Fixed by #707
Closed

composer-plugin-api should not be alphabetized as a dependency #673

danepowell opened this issue Jan 29, 2021 · 1 comment · Fixed by #707
Assignees
Labels

Comments

@danepowell
Copy link

danepowell commented Jan 29, 2021

Composer internally treats composer-plugin-api as a special dependency (alongside things like php or ext-json) and always places it ahead of other packages. This conflicts with Composer Normalize, which wants to sort composer-plugin-api alphabetically with other dependencies.

Steps required to reproduce the problem

  1. composer require composer-plugin-api
  2. composer require acquia/drupal-environment-detector
  3. composer require --dev ergebnis/composer-normalize
  4. composer normalize --dry-run

Expected Result

  • Composer Normalize does not complain, since composer.json was build natively by composer and is already sorted correctly:
"require": {
  "composer-plugin-api": "^2.0",
  "acquia/drupal-environment-detector": "^1.2"

Actual Result

  • Composer Normalize wants to move acquia/drupal-environment-detector above composer-plugin-api, conflicting with Composer's own sort logic
@localheinz
Copy link
Member

Thank you for reporting, @danepowell!

Will be fixed with ergebnis/json-normalizer#463. I will let you know when I release both packages!

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 a pull request may close this issue.

2 participants