From e61ad9575a000b410efcf2824ef3a4c87083e1b6 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 1 Dec 2021 13:03:44 +0100 Subject: [PATCH] Copy all environment variables when running PHPStan Pro --- src/Command/FixerApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/FixerApplication.php b/src/Command/FixerApplication.php index 698b24d7e..ff9031dac 100644 --- a/src/Command/FixerApplication.php +++ b/src/Command/FixerApplication.php @@ -313,7 +313,7 @@ private function getFixerProcess(OutputInterface $output, int $serverPort): Proc throw new \PHPStan\Command\FixerProcessException(); } - $env = null; + $env = getenv(); $forcedPort = $_SERVER['PHPSTAN_PRO_WEB_PORT'] ?? null; if ($forcedPort !== null) { $env['PHPSTAN_PRO_WEB_PORT'] = $_SERVER['PHPSTAN_PRO_WEB_PORT'];