Grav 1.7 CLI Self-Upgrade Bug

Impacts Grav 1.7.0 and 1.7.1

1 min

We have identified and fixed a bug in Grav 1.7.0 and 1.7.1 that causes issues when using the CLI (console) GPM command to perform a self-upgrade:

bin/gpm self-upgrade

This results in an error like this:

In HttpClientTrait.php line 223:
Unsupported option "curl" passed to "Symfony\Component\HttpClient\CurlHttpClient", did you mean "auth_basic", "auth_bearer", "query", "headers", "body", "json", "user_data", "max_redirects", "http_ve
rsion", "base_uri", "buffer", "on_progress", "resolve", "proxy", "no_proxy", "timeout", "max_duration", "bindto", "verify_peer", "verify_host", "cafile", "capath", "local_cert", "local_pk", "passphra
se", "ciphers", "peer_fingerprint", "capture_peer_cert_chain", "extra", "auth_ntlm"?

We have fixed this but because the bug is located in the self-upgrade command itself, you won't be able to upgrade via the CLI (admin works fine BTW), until the file itself is fixed. The fix is pretty simple however:

Please make sure you run this command for the ROOT of your Grav site, the same place you run the bin/gpm self-upgrade command.

Use either wget:

wget https://raw.githubusercontent.com/getgrav/grav/c8af0d8a385a4dce7d5c5ef54a50c23b5946167f/system/src/Grav/Console/Gpm/SelfupgradeCommand.php -O system/src/Grav/Console/Gpm/SelfupgradeCommand.php

or curl:

curl https://raw.githubusercontent.com/getgrav/grav/c8af0d8a385a4dce7d5c5ef54a50c23b5946167f/system/src/Grav/Console/Gpm/SelfupgradeCommand.php -o system/src/Grav/Console/Gpm/SelfupgradeCommand.php

Or manually by downloading the https://raw.githubusercontent.com/getgrav/grav/c8af0d8a385a4dce7d5c5ef54a50c23b5946167f/system/src/Grav/Console/Gpm/SelfupgradeCommand.php file and replacing your system/src/Grav/Console/Gpm/SelfupgradeCommand.php file.

After this fix, your upgrade should go smoothly.

Sorry for the inconvenience!

-- Grav Team

Grav Premium
Turbo-charge your Grav site - from the creators of Grav