[ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

Published on Author Code Father
Composer throws [ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

php composer.phar update

It gives me this error:

[ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

[ErrorException] Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::whatProvides() should be compatible with Composer\Repository\ComposerRepository::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypassFilters = false)

Can someone help me how to fix this?

Solution: 

About nine days ago, Composer\Repository\ComposerRepository::whatProvides api changed. (#2668) So, if you have installed fxp/composer-asset-plugin globally, you should update it. You can do that with:

php composer.phar global update fxp/composer-asset-plugin --no-plugins

Comments

comments

Categories Yii