Simplified upgrade instructions.

This commit is contained in:
James Cole 2016-09-14 20:35:45 +02:00
parent 3fe831c7d8
commit fab1d53714
2 changed files with 14 additions and 21 deletions

View File

@ -51,15 +51,22 @@ class UpgradeFireflyInstructions extends Command
/** @var string $version */
$version = config('firefly.version');
$config = config('upgrade.text');
$text = $config[$version] ?? null;
$text = null;
foreach (array_keys($config) as $compare) {
// if string starts with:
$len = strlen($compare);
if (substr($version, 0, $len) === $compare) {
$text = $config[$compare];
}
}
$this->line('+------------------------------------------------------------------------------+');
$this->line('');
if (is_null($text)) {
$this->line('Thank you for installing Firefly III, v' . $version);
$this->line('If you are upgrading from a previous version,');
$this->info('there are no extra upgrade instructions.');
$this->info('There are no extra upgrade instructions.');
$this->line('Firefly III should be ready for use.');
} else {
$this->line('Thank you for installing Firefly III, v' . $version);

View File

@ -13,23 +13,9 @@ declare(strict_types = 1);
return [
'text' => [
'3.7.0' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.7.1' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.7.2' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.7.2.1' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.7.2.2' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.7.2.3' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.8.0' => 'This version of Firefly III requires PHP 7.0.',
'3.8.1' => 'This version of Firefly III requires PHP 7.0.',
'3.10' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10',
'3.10.1' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10',
'3.10.2' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10',
'3.10.3' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10',
'3.7' => 'Because of the upgrade to Laravel 5.2, several manual changes must be made to your Firefly III installation. ' .
'Please follow the instructions on the following page: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.7.0',
'3.8' => 'This version of Firefly III requires PHP 7.0.',
'3.10' => 'Please find the full upgrade instructions here: https://github.com/JC5/firefly-iii/wiki/Upgrade-to-3.10',
],
];