[Composer] Fix PHP Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks()

When trying to install or update composer, it gives that error

PHP Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks() in /home/rataciber/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 272

Self-update didn’t work, so you have to delete that directory manually.

sudo rm -rf $HOME/.composer/vendor/fxp/

And that’s it.