diff --git a/src/Command/Configuration/MigrateLegacyConfig.php b/src/Command/Configuration/MigrateLegacyConfig.php index f547b5b3a..12d548131 100644 --- a/src/Command/Configuration/MigrateLegacyConfig.php +++ b/src/Command/Configuration/MigrateLegacyConfig.php @@ -17,7 +17,6 @@ use Pimcore\Console\AbstractCommand; use Pimcore\Model\Tool\SettingsStore; -use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -63,17 +62,14 @@ private function migrateConfiguration(string $fileName, string $scope): void } /** - * @return int|null + * @return int * * @throws \Exception */ public function execute(InputInterface $input, OutputInterface $output) { $this->migrateConfiguration('datahub-configurations.php', 'pimcore_data_hub'); - if (defined('Symfony\Component\Console\Command\Command::SUCCESS')) { - return Command::SUCCESS; - } else { - return 0; - } + + return self::SUCCESS; } } diff --git a/src/Command/Configuration/RebuildWorkspacesCommand.php b/src/Command/Configuration/RebuildWorkspacesCommand.php index ac9e9487a..610d45c24 100644 --- a/src/Command/Configuration/RebuildWorkspacesCommand.php +++ b/src/Command/Configuration/RebuildWorkspacesCommand.php @@ -18,7 +18,6 @@ use Pimcore\Bundle\DataHubBundle\Configuration; use Pimcore\Bundle\DataHubBundle\WorkspaceHelper; use Pimcore\Console\AbstractCommand; -use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -41,7 +40,7 @@ protected function configure() /** * * - * @return int|null + * @return int * * @throws \Exception */ @@ -76,10 +75,6 @@ public function execute(InputInterface $input, OutputInterface $output) } } - if (defined('Symfony\Component\Console\Command\Command::SUCCESS')) { - return Command::SUCCESS; - } else { - return 0; - } + return self::SUCCESS; } } diff --git a/src/Command/GraphQL/RebuildDefinitionsCommand.php b/src/Command/GraphQL/RebuildDefinitionsCommand.php index ab87af564..5ea7bb106 100644 --- a/src/Command/GraphQL/RebuildDefinitionsCommand.php +++ b/src/Command/GraphQL/RebuildDefinitionsCommand.php @@ -17,7 +17,6 @@ use Pimcore\Bundle\DataHubBundle\Configuration; use Pimcore\Console\AbstractCommand; -use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -44,7 +43,7 @@ protected function configure() * * @throws \Exception * - *@deprecated Use Pimcore\Bundle\DataHubBundle\Command\Configuration\RebuildWorkspacesCommand instead. + * @deprecated Use Pimcore\Bundle\DataHubBundle\Command\Configuration\RebuildWorkspacesCommand instead. * */ public function execute(InputInterface $input, OutputInterface $output) @@ -76,11 +75,6 @@ public function execute(InputInterface $input, OutputInterface $output) $this->output->writeln('done'); - if (defined('Symfony\Component\Console\Command\Command::SUCCESS')) { - return Command::SUCCESS; - } else { - //TODO remove this as soon as support for Symfony 4 gets dropped - return 0; - } + return self::SUCCESS; } }