Reputation: 2174
Just tried to run a composer dump-autoload
, but ended up with the following error, which I have never had previously
Class UpdateHelper\ComposerPlugin contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Composer\Plugin\PluginInterface::deactivate, Composer\Plugin\PluginInterface::uninstall) in /var/www/vhosts/example.com/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php on line 11
Searched on G to find some answers, but found nothing even remotely close the problem I am having here.
Any suggestions?
Upvotes: 22
Views: 34516
Reputation: 351
Please delete or change name the directory "kylekatarnls" and composer update
1, mv kylekatarnls kylekatarnls_bk
or rm -rf kylekatarnls
2, composer update
=> Success
Upvotes: 4
Reputation: 604
This worked for me:
rm -rf vendor
rm -f composer.lock
composer install
Upvotes: 3
Reputation: 162
Downgrade Composer to version 1 worked for me.
composer self-update 1.10.22
rm -rf vendor
composer install
Upvotes: 5
Reputation: 2174
I just found a solution to this problem. Here it is for those who have the same problem.
I have had to delete the directory kylekatarnls
located inside my vendor
directory then run composer update --prefer-source
and after that composer dump-autoload
.
Now all is working just fine.
Upvotes: 54
Reputation: 492
It seems like you're using Composer v2. If so, read on...
Composer v2 adds some new functions to their Plugin interface (namely deactivate()
and uninstall()
)
However kylekatarnls/update-helper
< v1.2.1 is implementing said interface but does not implement the new functions.
So to fix, you'll need to update kylekatarnls/update-helper
to the latest (v1.2.1 at time of writing), which contains a fix (implements the missing methods):
composer update kylekatarnls/update-helper
Upvotes: 13
Reputation: 106
I remove the vendor directory and the composer.lock file. After execute composer install and all works well.
Upvotes: 7