Composer Fatal error: Declaration of Fxp... must be compatible with ...AbstractAssetsRepository.php on line 334
You can temporarily disable composer plugins with the --no-plugins
option:
composer global remove fxp/composer-asset-plugin --no-plugins
See Composer docs - Global options:
--no-plugins: Disables plugins.
To solve the above error while installing composer asset plugin please do the following
delete fxp folder in the path C:\Users\UserName\AppData\Roaming\Composer\vendor
remove
"fxp/composer-asset-plugin": "^1.4"
from composer.json file in composer folderrun this command
composer global remove fxp/composer-asset-plugin --no-plugins
to make sure no fxp folder is left and json datacomposer global require fxp/composer-asset-plugin --no-plugins
Run this command to install composer asset plugin and it will be installed easilyIf you want to update existing plugin, run this command
composer global update fxp/composer-asset-plugin --no-plugins