Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Argument Exception #508

Open
maxthegold opened this issue Dec 9, 2021 · 2 comments
Open

Invalid Argument Exception #508

maxthegold opened this issue Dec 9, 2021 · 2 comments

Comments

@maxthegold
Copy link

maxthegold commented Dec 9, 2021

Getting this error trying to install, using PHP 7.3 on Raspberry Pi 4 (Buster),

pi@raspberrypi:~/cops $ php composer.phar global require "fxp/composer-asset-plugin:~1.1"
Changed current directory to /home/pi/.config/composer

[InvalidArgumentException]
Package fxp/composer-asset-plugin at version ~1.1 has requirements incompatible with your PHP version, PHP extensio
ns and Composer version:
- fxp/composer-asset-plugin v1.4.6 requires composer-plugin-api ^1.0 which does not match your installed version
2.2.0.

@marioscube
Copy link

To me this looks like issue #477

To fix this you can do either of 2 things:

1 - install COPS from https://github.com/seblucas/cops/releases/tag/1.1.3

2 - install COPS from source with a dirty fix (download the old composer phar)

Install from source
git clone https://github.com/seblucas/cops.git
cd cops
https://getcomposer.org/download/1.9.0/composer.phar
php composer.phar global require "fxp/composer-asset-plugin:~1.1"
php composer.phar install --no-dev --optimize-autoloader

I have not checked if this still works or not. Just use option 1!

@maxthegold
Copy link
Author

Thanks for the advice. Decided to go with option 1 and it worked like a dream. I don't know why I didn't do that first of all, I just like to make things difficult for myself I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants