terminus
terminus copied to clipboard
When updating from 1.x to 2.0 -- suggestion to provide better directions on how to upgrade terminus
Expected behavior
when using terminus, on an older version, you get this notice.
[notice] A new Terminus version v2.0.0 is available.
You are currently using version v1.9.0.
You can update Terminus by running `composer update` or using the Terminus installer:
curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar update
Running composer update
or the curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar update
command results in no update happening.
➜ ~ curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar update
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3198k 100 3198k 0 0 4995k 0 --:--:-- --:--:-- --:--:-- 4989k
Updating Terminus...
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
➜ ~ terminus --version
Terminus 1.9.0
Then I tried composer update
➜ ~ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 17 updates, 0 removals
- Installing ralouphie/getallheaders (2.0.5): Loading from cache
... and a few other things that apparently needed to be updated ...
Writing lock file
Generating autoload files
➜ ~ terminus
Terminus 1.9.0
Light bulb
Thinking, "oh hey, composer..." I open the composer.json file and find this.
{
"require": {
"pantheon-systems/terminus": "^1.8",
"guzzlehttp/guzzle": "~6.0"
}
}
Which would explain why it wasn't updating to 2.0
I changed the terminus line to "^2.0" and it then worked when I did composer update
.
Suggestion
I don't know enough about composer to know what that it should say to always take the latest stable version, but thats one option. Also, maybe changing the instructions you see when you run a terminus command to send you to a nicely documented webpage might be a good fix also.
Love the product. Thank you!
It might make sense to roll another Terminus 1.x release to get this message updated & also fix the fatal error that happens when Terminus 1.x detects an incompatible plugin.
For Terminus 2, if you install the .phar, it will be possible to update via the self:update
command. We should probably start directing folks to use the phar.
I made Jira issue AL-1784 out of this and we will be discussing this at our next planning meeting.
Some version of this problem is still around, I saw this message:
[notice] A new Terminus version v3.0.7 is available.
You are currently using version v2.6.2.
You can update Terminus by running `composer update` or using the Terminus installer:
curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar update
I ran the curl, and got:
This command is deprecated. Please use `terminus self-update` instead.
Ran terminus self-update
and got:
Command "self-update" is not defined.
If you remove the version of Terminus you have installed, and then use the Terminus installer to install a new version of Terminus, then you will get Terminus 3 and will be able to use terminus self-update
to update to newer versions thereafter.