diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b24e1f..fb708b9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to `laravel-love` will be documented in this file. ## [Unreleased] +## [8.7.1] - 2020-12-06 + +### Fixed + +- ([#186]) Improve CLI application performance by replacing `$name` with `$defaultName` static property in commands +- ([#187]) Fixed inconsistency in method parameter names + ## [8.7.0] - 2020-12-06 ### Added @@ -462,7 +469,8 @@ Follow [upgrade instructions](UPGRADING.md#from-v5-to-v6) to migrate database to - Initial release -[Unreleased]: https://github.com/cybercog/laravel-love/compare/8.7.0...master +[Unreleased]: https://github.com/cybercog/laravel-love/compare/8.7.1...master +[8.7.1]: https://github.com/cybercog/laravel-love/compare/8.7.0...8.7.1 [8.7.0]: https://github.com/cybercog/laravel-love/compare/8.6.1...8.7.0 [8.6.1]: https://github.com/cybercog/laravel-love/compare/8.6.0...8.6.1 [8.6.0]: https://github.com/cybercog/laravel-love/compare/8.5.0...8.6.0 @@ -507,6 +515,8 @@ Follow [upgrade instructions](UPGRADING.md#from-v5-to-v6) to migrate database to [1.1.1]: https://github.com/cybercog/laravel-love/compare/1.1.0...1.1.1 [1.1.0]: https://github.com/cybercog/laravel-love/compare/1.0.0...1.1.0 +[#187]: https://github.com/cybercog/laravel-love/pull/187 +[#186]: https://github.com/cybercog/laravel-love/pull/186 [#185]: https://github.com/cybercog/laravel-love/pull/185 [#178]: https://github.com/cybercog/laravel-love/pull/178 [#177]: https://github.com/cybercog/laravel-love/pull/177 diff --git a/src/Console/Commands/ReactionTypeAdd.php b/src/Console/Commands/ReactionTypeAdd.php index 48ec34f2..95fdb20a 100644 --- a/src/Console/Commands/ReactionTypeAdd.php +++ b/src/Console/Commands/ReactionTypeAdd.php @@ -25,7 +25,7 @@ final class ReactionTypeAdd extends Command * * @var string */ - protected $name = 'love:reaction-type-add'; + protected static $defaultName = 'love:reaction-type-add'; /** * The console command description. diff --git a/src/Console/Commands/Recount.php b/src/Console/Commands/Recount.php index 07e0ca16..54dd478b 100644 --- a/src/Console/Commands/Recount.php +++ b/src/Console/Commands/Recount.php @@ -30,7 +30,7 @@ final class Recount extends Command * * @var string */ - protected $name = 'love:recount'; + protected static $defaultName = 'love:recount'; /** * The console command description. diff --git a/src/Console/Commands/RegisterReactants.php b/src/Console/Commands/RegisterReactants.php index 6cb81fe4..7dbb201b 100644 --- a/src/Console/Commands/RegisterReactants.php +++ b/src/Console/Commands/RegisterReactants.php @@ -27,7 +27,7 @@ final class RegisterReactants extends Command * * @var string */ - protected $name = 'love:register-reactants'; + protected static $defaultName = 'love:register-reactants'; /** * The console command description. diff --git a/src/Console/Commands/RegisterReacters.php b/src/Console/Commands/RegisterReacters.php index 335dd0aa..cece163f 100644 --- a/src/Console/Commands/RegisterReacters.php +++ b/src/Console/Commands/RegisterReacters.php @@ -27,7 +27,7 @@ final class RegisterReacters extends Command * * @var string */ - protected $name = 'love:register-reacters'; + protected static $defaultName = 'love:register-reacters'; /** * The console command description. diff --git a/src/Console/Commands/SetupReactable.php b/src/Console/Commands/SetupReactable.php index 53bf7512..a7dc1dc5 100644 --- a/src/Console/Commands/SetupReactable.php +++ b/src/Console/Commands/SetupReactable.php @@ -33,7 +33,7 @@ final class SetupReactable extends Command * * @var string */ - protected $name = 'love:setup-reactable'; + protected static $defaultName = 'love:setup-reactable'; /** * The console command description. diff --git a/src/Console/Commands/SetupReacterable.php b/src/Console/Commands/SetupReacterable.php index ff0ad334..5b55e777 100644 --- a/src/Console/Commands/SetupReacterable.php +++ b/src/Console/Commands/SetupReacterable.php @@ -33,7 +33,7 @@ final class SetupReacterable extends Command * * @var string */ - protected $name = 'love:setup-reacterable'; + protected static $defaultName = 'love:setup-reacterable'; /** * The console command description. diff --git a/src/Console/Commands/UpgradeV5ToV6.php b/src/Console/Commands/UpgradeV5ToV6.php index c980c592..55b7b028 100644 --- a/src/Console/Commands/UpgradeV5ToV6.php +++ b/src/Console/Commands/UpgradeV5ToV6.php @@ -33,7 +33,7 @@ final class UpgradeV5ToV6 extends Command * * @var string */ - protected $name = 'love:upgrade-v5-to-v6'; + protected static $defaultName = 'love:upgrade-v5-to-v6'; /** * The console command description. @@ -57,9 +57,9 @@ public function __construct(Builder $queryBuilder) /** * Execute the console command. * - * @return void + * @return int */ - public function handle(): void + public function handle(): int { $this->dbMigrate(); $this->populateReactionTypes(); @@ -68,6 +68,8 @@ public function handle(): void $this->populateReactions(); $this->dbCleanup(); $this->filesystemCleanup(); + + return 0; } private function dbMigrate(): void diff --git a/src/Console/Commands/UpgradeV7ToV8.php b/src/Console/Commands/UpgradeV7ToV8.php index b12eafde..757633d1 100644 --- a/src/Console/Commands/UpgradeV7ToV8.php +++ b/src/Console/Commands/UpgradeV7ToV8.php @@ -29,7 +29,7 @@ final class UpgradeV7ToV8 extends Command * * @var string */ - protected $name = 'love:upgrade-v7-to-v8'; + protected static $defaultName = 'love:upgrade-v7-to-v8'; /** * The console command description. @@ -41,9 +41,9 @@ final class UpgradeV7ToV8 extends Command /** * Execute the console command. * - * @return void + * @return int */ - public function handle(): void + public function handle(): int { $this->assertRequirements(); $this->warn('Started Laravel Love v7 to v8 upgrade process.'); @@ -52,6 +52,8 @@ public function handle(): void $this->dbChangeReactantReactionCounters(); $this->dbChangeReactantReactionTotals(); $this->info('Completed Laravel Love v7 to v8 upgrade process.'); + + return 0; } private function assertRequirements(): void