From 0eb36299a3890b12ff68a0d9f94a603b1a890c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sat, 1 Oct 2022 20:26:12 +0200 Subject: [PATCH 1/2] Remove dependency on the container to get the current path --- src/Parallelization.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Parallelization.php b/src/Parallelization.php index 578cea2..f67e05b 100644 --- a/src/Parallelization.php +++ b/src/Parallelization.php @@ -232,7 +232,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->getConsolePath(), self::detectPhpExecutable(), $this->getName(), - self::getWorkingDirectory($container), + self::getWorkingDirectory(), $this->getExtraEnvironmentVariables(), $this->getDefinition(), $this->createItemErrorHandler(), @@ -341,13 +341,9 @@ private static function detectPhpExecutable(): string /** * Returns the working directory for the child process. - * - * @param ContainerInterface $container The service container - * - * @return string The absolute path to the working directory */ - private static function getWorkingDirectory(ContainerInterface $container): string + private static function getWorkingDirectory(): string { - return dirname($container->getParameter('kernel.project_dir')); + return getcwd(); } } From 972d647391414575aa33d3bdd6901bc26bbe259e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Sat, 1 Oct 2022 20:32:31 +0200 Subject: [PATCH 2/2] Remove --- src/Parallelization.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Parallelization.php b/src/Parallelization.php index f67e05b..b8c5540 100644 --- a/src/Parallelization.php +++ b/src/Parallelization.php @@ -215,7 +215,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int { $parallelizationInput = ParallelizationInput::fromInput($input); - $container = $this->getContainer(); $logger = $this->createLogger($output); return (new ParallelExecutor(