Problem/Motivation
When PHP version is below recommend 8.1 Upgrade Statues recommends the following:
PHP version should be at least 8.1.0. Before updating to PHP 8, use
$ composer why-not php:8.1
to check if any projects need updating for compatibility. Also check custom projects manually.
However the command composer why-not php:8.1
triggers the following error:
➜ site git:(master) ✗ composer why-not php:8.1
[Symfony\Component\Console\Exception\RuntimeException]
Not enough arguments (missing: "version").
prohibits [-r|--recursive] [-t|--tree] [--] <package> <version>
Steps to reproduce
Attempt to run the command composer why-not php:8.1
.
Proposed resolution
Update messaging to recommend the correctly formatted command: composer why-not php 8.1
Comment | File | Size | Author |
---|---|---|---|
#5 | Screenshot 2022-08-15 at 8.54.06.png | 100.93 KB | Gábor Hojtsy |
Issue fork upgrade_status-3303527
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
wellsComment #4
wellsComment #5
Gábor HojtsyInteresting. I did not try it when I updated from
why-not php:8
towhy-not php:8.1
, but the php:8 syntax is documented in the official docs at https://getcomposer.org/doc/03-cli.md#prohibits-why-not-Comment #6
wellsInteresting. Opened a PR to update the docs: https://github.com/composer/composer/pull/10994
Comment #7
wellsThat PR was merged so the composer documentation is corrected now.
Comment #8
xaa CreditAttribution: xaa as a volunteer commentedComment #10
Gábor HojtsyLooks great, thanks! Also special thanks for getting the composer docs themselves fixed!