From afcb3e220760c56d23f40b234978aa909402f0ff Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 22 Dec 2023 10:29:21 +0545 Subject: [PATCH 1/2] fix: exit with success command line status 0 for not implemented things --- src/Command/BackupDataCommand.php | 2 +- src/Command/BackupDbCommand.php | 2 +- src/Command/CleanCacheCommand.php | 2 +- src/Command/PostUpgradeRepairCommand.php | 2 +- src/Command/PreUpgradeRepairCommand.php | 2 +- src/Command/RestartWebServerCommand.php | 2 +- src/Command/UpdateConfigCommand.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Command/BackupDataCommand.php b/src/Command/BackupDataCommand.php index 9eb7227..9ea5aad 100644 --- a/src/Command/BackupDataCommand.php +++ b/src/Command/BackupDataCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:backupData command is not implemented'); - return 1; + return 0; } } diff --git a/src/Command/BackupDbCommand.php b/src/Command/BackupDbCommand.php index f4f36ee..71b309b 100644 --- a/src/Command/BackupDbCommand.php +++ b/src/Command/BackupDbCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:backupDb command is not implemented'); - return 1; + return 0; } } diff --git a/src/Command/CleanCacheCommand.php b/src/Command/CleanCacheCommand.php index 282fec5..64a66ed 100644 --- a/src/Command/CleanCacheCommand.php +++ b/src/Command/CleanCacheCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:cleanCache command is not implemented'); - return 1; + return 0; } } diff --git a/src/Command/PostUpgradeRepairCommand.php b/src/Command/PostUpgradeRepairCommand.php index c0166bc..e8bbcc6 100644 --- a/src/Command/PostUpgradeRepairCommand.php +++ b/src/Command/PostUpgradeRepairCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:postUpgradeRepair command is not implemented'); - return 1; + return 0; } } diff --git a/src/Command/PreUpgradeRepairCommand.php b/src/Command/PreUpgradeRepairCommand.php index 0cc41a4..02a283a 100644 --- a/src/Command/PreUpgradeRepairCommand.php +++ b/src/Command/PreUpgradeRepairCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:preUpgradeRepair command is not implemented'); - return 1; + return 0; } } diff --git a/src/Command/RestartWebServerCommand.php b/src/Command/RestartWebServerCommand.php index c324321..64c37e7 100644 --- a/src/Command/RestartWebServerCommand.php +++ b/src/Command/RestartWebServerCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:restartWebServer command is not implemented'); - return 1; + return 0; } } diff --git a/src/Command/UpdateConfigCommand.php b/src/Command/UpdateConfigCommand.php index db48e54..a803ea6 100644 --- a/src/Command/UpdateConfigCommand.php +++ b/src/Command/UpdateConfigCommand.php @@ -44,6 +44,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('upgrade:updateConfig command is not implemented'); - return 1; + return 0; } } From 7300e05986a2d6520e4b50ffdcacde60e7a472df Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 22 Dec 2023 10:43:16 +0545 Subject: [PATCH 2/2] test: remove phpstan ignoreErrors entries for things that are not errors --- phpstan.neon | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 0586ace..3c632d4 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,27 +7,3 @@ parameters: message: '#File ends with a trailing whitespace. This may cause problems when running the code in the web browser. Remove the closing \?\> mark or remove the whitespace.#' path: src/Resources/views/partials/error.php count: 1 - - - message: '#Undefined variable: \$OC_Version$#' - path: src/Command/ExecuteCoreUpgradeScriptsCommand.php - count: 1 - - - message: '#Undefined variable: \$OC_VersionCanBeUpgradedFrom$#' - path: src/Command/ExecuteCoreUpgradeScriptsCommand.php - count: 1 - - - message: '#Undefined variable: \$CONFIG$#' - path: src/Utils/Locator.php - count: 2 - - - message: '#Undefined variable: \$OC_Version$#' - path: src/Utils/Locator.php - count: 1 - - - message: '#Undefined variable: \$OC_Channel$#' - path: src/Utils/Locator.php - count: 1 - - - message: '#Undefined variable: \$OC_Build$#' - path: src/Utils/Locator.php - count: 1