Skip to content

Firefly III: a personal finances manager

Simplified upgrade instructions.

James Colefab1d5371419
diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php
index 561858ba9e..712438eefa 100644
--- a/app/Console/Commands/UpgradeFireflyInstructions.php
+++ b/app/Console/Commands/UpgradeFireflyInstructions.php
@@ -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);
diff --git a/config/upgrade.php b/config/upgrade.php
index dbf9c1194b..5d1b69393a 100644
--- a/config/upgrade.php
+++ b/config/upgrade.php
@@ -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',
],
];