Release in composer update after pulling yii project from git

I just cloned and pulled a yii project from yii, I need it globally fxp/composer-asset-plugin:~1.1.1with this command composer global require "fxp/composer-asset-plugin:~1.1.1"and also globally fxp/composer-asset-pluginwith this command composer global require "fxp/composer-asset-plugin", but when I run an update for the composer to make a vender file and autoload to use the project, I get the following error:

Your requirements could not be resolved to an installable set of packages.

And I also get the following error when the linker tries to update other projects to the update task:

The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this *WILL* break in the future and it should be fixed ASAP (require ^1.0 for example).

can someone help fix these two, especially the first one, because I assume the following problems are related.

(I also tried reinstalling the composer, but still got the same errors)

+4
source share
1 answer

You can actually do it

composer global remove "fxp/composer-asset-plugin"

Then delete the folder vendorand yours composer.lock(you will get all your performances in the next step).

Then run

composer global require "fxp/composer-asset-plugin:*"

And finally

composer install

If that doesn't work. Try deleting the global folder vendor. For example, if you use ubuntu, you can find it here /home/someUser/.composer/vendor(it will DELETE ALL packages that were installed globally)

Next run composer global require "fxp/composer-asset-plugin:*" This should work.

0
source

Source: https://habr.com/ru/post/1626654/


All Articles