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
parent
f7e6636652
commit
50332db194
|
@ -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) {
|
||||
|
|
|
@ -105,7 +105,6 @@ class QuickStartTest extends TestCase {
|
|||
'--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 @@ class QuickStartTest extends TestCase {
|
|||
'--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 @@ class QuickStartTest extends TestCase {
|
|||
"--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 @@ class QuickStartTest extends TestCase {
|
|||
'--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 @@ class QuickStartTest extends TestCase {
|
|||
"--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 @@ class QuickStartTest extends TestCase {
|
|||
"--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 @@ class QuickStartTest extends TestCase {
|
|||
'--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());
|
||||
}
|
||||
|
|
|
@ -160,7 +160,6 @@ trait DeprecationListenerTrait {
|
|||
'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.
|
||||
|
|
Loading…
Reference in New Issue