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

Erreur avec Composer 2 #4

Closed
samuelbeaulieu opened this issue Nov 29, 2020 · 2 comments
Closed

Erreur avec Composer 2 #4

samuelbeaulieu opened this issue Nov 29, 2020 · 2 comments

Comments

@samuelbeaulieu
Copy link
Contributor

Problème

Après avoir fait composer install à la racine d'un projet October, je tombe sur cette erreur.

# composer install
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires wikimedia/composer-merge-plugin 1.4.1 -> satisfiable by wikimedia/composer-merge-plugin[v1.4.1].
    - wikimedia/composer-merge-plugin v1.4.1 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

Solution 1

La solution que j'ai utilisé pour régler le problème était de downgrade la version de composer avec composer self-update --1. Je ne sais pas si c'est une bonne solution à long terme, mais c'est clairement moins pratique.

# composer self-update --1
Warning: You forced the install of 1.10.17 via --1, but 2.0.7 is the latest stable version. Updating to it via composer self-update --stable is recommended.
Upgrading to version 1.10.17 (1.x channel).
   
Use composer self-update --rollback to return to version 2.0.7

Solution 2

Une autre solution que j'ai trouvé était de faire composer i --ignore-platform-reqs qui peut fonctionner mais qui risque de causer plus de problème si certain plugins sont ignoré.

@TheJackMachine
Copy link
Owner

J’utilise la solution numéro 2.
Cette erreur n’a lieu que sur certaines installations d’October.
Il faut attendre le fix de Rainlab
Une troisième solution consiste à virer carrément la ligne de plateform-reqs dans le composer install.

@samuelbeaulieu
Copy link
Contributor Author

Okay, super! Merci pour la clarification!

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