diff --git a/Command/PullCommand.php b/Command/PullCommand.php index d13cc6e..81928b2 100644 --- a/Command/PullCommand.php +++ b/Command/PullCommand.php @@ -49,12 +49,14 @@ protected function getCommandDescription(): string return self::COMMAND_DESCRIPTION; } - protected function execute(InputInterface $input, OutputInterface $output): void + protected function execute(InputInterface $input, OutputInterface $output): int { $this->handlePullDisplay($output); $this->translationService->pull( $input->getOption('filePath'), $input->getOption('locale') ); + + return 0; } } diff --git a/Command/PushCommand.php b/Command/PushCommand.php index 257cf66..e754b7b 100644 --- a/Command/PushCommand.php +++ b/Command/PushCommand.php @@ -49,12 +49,14 @@ protected function getCommandDescription(): string return self::COMMAND_DESCRIPTION; } - protected function execute(InputInterface $input, OutputInterface $output): void + protected function execute(InputInterface $input, OutputInterface $output): int { $this->handlePushDisplay($output); $this->translationService->push( $input->getOption('filePath'), $input->getOption('locale') ); + + return 0; } } diff --git a/Command/UpdateCommand.php b/Command/UpdateCommand.php index 48a1ae0..9065732 100644 --- a/Command/UpdateCommand.php +++ b/Command/UpdateCommand.php @@ -40,11 +40,13 @@ protected function getCommandDescription(): string return self::COMMAND_DESCRIPTION; } - protected function execute(InputInterface $input, OutputInterface $output): void + protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln("Updating translations\n"); $this->handlePullDisplay($output); $this->handlePushDisplay($output); $this->translationService->update(); + + return 0; } } diff --git a/Resources/config/services.xml b/Resources/config/services.xml index 36268d3..2f318d7 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -36,7 +36,7 @@ %openclassrooms_onesky.file_format% - %kernel.root_dir% + %kernel.project_dir% %openclassrooms_onesky.project_id% diff --git a/Tests/Command/CommandTestCase.php b/Tests/Command/CommandTestCase.php index 74ebdab..eb6dd8a 100644 --- a/Tests/Command/CommandTestCase.php +++ b/Tests/Command/CommandTestCase.php @@ -40,7 +40,7 @@ protected function getContainer() 'openclassrooms_onesky.file_paths' => [self::$filePaths], 'openclassrooms_onesky.requestedLocales' => self::$locales, 'openclassrooms_onesky.project_id' => self::$projectId, - 'kernel.root_dir' => __DIR__.'/../', + 'kernel.project_dir' => __DIR__.'/../', ], [ 'openclassrooms.onesky.services.language_service' => new LanguageServiceMock(), diff --git a/Tests/DependencyInjection/OpenClassroomsOneSkyExtensionTest.php b/Tests/DependencyInjection/OpenClassroomsOneSkyExtensionTest.php index 5e7010a..0745f54 100644 --- a/Tests/DependencyInjection/OpenClassroomsOneSkyExtensionTest.php +++ b/Tests/DependencyInjection/OpenClassroomsOneSkyExtensionTest.php @@ -27,7 +27,7 @@ public function container_compile() $bundle->build($container); - $container->setParameter('kernel.root_dir', __DIR__.'/../../'); + $container->setParameter('kernel.project_dir', __DIR__.'/../../'); $container->compile(); $this->assertTrue($container->isFrozen()); }