Closed t-schroeder closed 9 months ago
Here's what I get when trying to install version 3.3.10 (currently the latest) explicitly:
$ composer global require moodlehq/moodle-cs 3.3.10
Changed current directory to /home/st-admin/.config/composer
./composer.json has been updated
Running composer update moodlehq/moodle-cs
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires moodlehq/moodle-cs 3.3.10 -> satisfiable by moodlehq/moodle-cs[v3.3.10].
- moodlehq/moodle-cs v3.3.10 requires phpcompatibility/php-compatibility dev-develop#0a17f9ed -> found phpcompatibility/php-compatibility[dev-develop, 10.x-dev (alias of dev-develop)] but it does not match your minimum-stability.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Here's what is necessary to get composer to install the latest version:
composer global config minimum-stability dev
composer global config prefer-stable true
composer global require moodlehq/moodle-cs
That solves the issue for me. But I would recommend adding this to the readme, so others won't have to spend potentially hours troubleshooting, too.
Thanks Tim,
The issue here is that one of our dependency (phpcompatibility) has not got a stable version out which is compatible with supported php versions (the irony...).
Our options here are to stop using it as a dependency, or fork it.
In the mean time, you can run the following which will allow you to use the dev version we're currently pointing at:
composer global config minimum-stability dev
The recommended installation via composer gives me version 3.2.5 instead of the latest version which is 3.3.10 at the time of writing this. That old version doesn't include the "moodle-extra" standard which is recommended in the readme. How do I get composer to install the latest version of "moodlehq/moodle-cs"?