yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.91k forks source link

Error after upgrade composer to release 2.0.4 #18363

Closed samuelexyz closed 4 years ago

samuelexyz commented 4 years ago

After upgrade composer to the latest version, when i try to launch

php composer.phar update

i got 👍 The "fxp/composer-asset-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option. The "fxp/composer-asset-plugin" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option. Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

What steps will reproduce the problem?

upgrade composer and launch composer update

Additional info

Q A
Yii version 2.0.32
PHP version 7.4.10
Operating system MacOs
samuelexyz commented 4 years ago

I solved it by disabling fpx-asset in composer.json

"config": { "process-timeout": 1800, "discard-changes": true, "fxp-asset": { "enabled": false } }, "repositories": [ { "type": "composer", "url": "https://asset-packagist.org" } ]

schmunk42 commented 4 years ago

https://github.com/fxpio/composer-asset-plugin/issues/334

gongkepop commented 1 year ago

Plugin API version ("^1.0") composer --version 2.0.0

so

composer self-update --1

try again

php composer.phar update