Unverified Commit 5a0caaf8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3117858 by longwave, druprad, Kristen Pol: [Symfony 5] The...

Issue #3117858 by longwave, druprad, Kristen Pol: [Symfony 5] The "Symfony\Component\Process\Process::inheritEnvironmentVariables()" method is deprecated since Symfony 4.4, env variables are always inherited

(cherry picked from commit 50332db1)
parent 2e30f2c1
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ trait ExecTrait {
   */
  protected function mustExec($cmd, $cwd, array $env = []) {
    $process = new Process($cmd, $cwd, $env + ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')]);
    $process->inheritEnvironmentVariables();
    $process->setTimeout(300)->setIdleTimeout(300)->run();
    $exitCode = $process->getExitCode();
    if (0 != $exitCode) {
+0 −7
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ public function testQuickStartCommand() {
      '--suppress-login',
    ];
    $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $process->inheritEnvironmentVariables();
    $process->setTimeout(500);
    $process->start();
    $guzzle = new Client();
@@ -158,7 +157,6 @@ public function testPhpRequirement() {
      '--suppress-login',
    ];
    $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $process->inheritEnvironmentVariables();
    $process->setTimeout(500);
    $process->start();
    while ($process->isRunning()) {
@@ -195,7 +193,6 @@ public function testQuickStartInstallAndServerCommands() {
      "--site-name='Test site {$this->testDb->getDatabasePrefix()}'",
    ];
    $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $install_process->inheritEnvironmentVariables();
    $install_process->setTimeout(500);
    $result = $install_process->run();
    // The progress bar uses STDERR to write messages.
@@ -210,7 +207,6 @@ public function testQuickStartInstallAndServerCommands() {
      '--suppress-login',
    ];
    $server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $server_process->inheritEnvironmentVariables();
    $server_process->start();
    $guzzle = new Client();
    $port = FALSE;
@@ -249,7 +245,6 @@ public function testQuickStartInstallAndServerCommands() {
      "--site-name='Test another site {$this->testDb->getDatabasePrefix()}'",
    ];
    $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $install_process->inheritEnvironmentVariables();
    $install_process->setTimeout(500);
    $result = $install_process->run();
    $this->assertStringContainsString('Drupal is already installed.', $install_process->getOutput());
@@ -278,7 +273,6 @@ public function testQuickStartCommandProfileValidation() {
      "--site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login",
    ];
    $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $process->inheritEnvironmentVariables();
    $process->run();
    $this->assertStringContainsString('\'umami\' is not a valid install profile. Did you mean \'demo_umami\'?', $process->getErrorOutput());
  }
@@ -294,7 +288,6 @@ public function testServerWithNoInstall() {
      '--suppress-login',
    ];
    $server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
    $server_process->inheritEnvironmentVariables();
    $server_process->run();
    $this->assertStringContainsString('No installation found. Use the \'install\' command.', $server_process->getErrorOutput());
  }
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@ public static function getSkippedDeprecations() {
      'The "Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch()" method will require a new "string|null $eventName" argument in the next major version of its parent class "Symfony\Contracts\EventDispatcher\EventDispatcherInterface", not defining it is deprecated.',
      'Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell.',
      'Passing arguments to "Symfony\Component\HttpFoundation\Request::isMethodSafe()" has been deprecated since Symfony 4.4; use "Symfony\Component\HttpFoundation\Request::isMethodCacheable()" to check if the method is cacheable instead.',
      'The "Symfony\Component\Process\Process::inheritEnvironmentVariables()" method is deprecated since Symfony 4.4, env variables are always inherited.',
      'The "Symfony\Component\Debug\BufferingLogger" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\BufferingLogger" instead.',
      // The following deprecation is listed for Twig 2 compatibility when unit
      // testing using \Symfony\Component\ErrorHandler\DebugClassLoader.