Unverified Commit 50332db1 authored by alexpott's avatar alexpott
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
parent f7e66366
...@@ -24,7 +24,6 @@ trait ExecTrait { ...@@ -24,7 +24,6 @@ trait ExecTrait {
*/ */
protected function mustExec($cmd, $cwd, array $env = []) { protected function mustExec($cmd, $cwd, array $env = []) {
$process = new Process($cmd, $cwd, $env + ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')]); $process = new Process($cmd, $cwd, $env + ['PATH' => getenv('PATH'), 'HOME' => getenv('HOME')]);
$process->inheritEnvironmentVariables();
$process->setTimeout(300)->setIdleTimeout(300)->run(); $process->setTimeout(300)->setIdleTimeout(300)->run();
$exitCode = $process->getExitCode(); $exitCode = $process->getExitCode();
if (0 != $exitCode) { if (0 != $exitCode) {
......
...@@ -105,7 +105,6 @@ public function testQuickStartCommand() { ...@@ -105,7 +105,6 @@ public function testQuickStartCommand() {
'--suppress-login', '--suppress-login',
]; ];
$process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$process->inheritEnvironmentVariables();
$process->setTimeout(500); $process->setTimeout(500);
$process->start(); $process->start();
$guzzle = new Client(); $guzzle = new Client();
...@@ -158,7 +157,6 @@ public function testPhpRequirement() { ...@@ -158,7 +157,6 @@ public function testPhpRequirement() {
'--suppress-login', '--suppress-login',
]; ];
$process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$process->inheritEnvironmentVariables();
$process->setTimeout(500); $process->setTimeout(500);
$process->start(); $process->start();
while ($process->isRunning()) { while ($process->isRunning()) {
...@@ -195,7 +193,6 @@ public function testQuickStartInstallAndServerCommands() { ...@@ -195,7 +193,6 @@ public function testQuickStartInstallAndServerCommands() {
"--site-name='Test site {$this->testDb->getDatabasePrefix()}'", "--site-name='Test site {$this->testDb->getDatabasePrefix()}'",
]; ];
$install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$install_process->inheritEnvironmentVariables();
$install_process->setTimeout(500); $install_process->setTimeout(500);
$result = $install_process->run(); $result = $install_process->run();
// The progress bar uses STDERR to write messages. // The progress bar uses STDERR to write messages.
...@@ -210,7 +207,6 @@ public function testQuickStartInstallAndServerCommands() { ...@@ -210,7 +207,6 @@ public function testQuickStartInstallAndServerCommands() {
'--suppress-login', '--suppress-login',
]; ];
$server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$server_process->inheritEnvironmentVariables();
$server_process->start(); $server_process->start();
$guzzle = new Client(); $guzzle = new Client();
$port = FALSE; $port = FALSE;
...@@ -249,7 +245,6 @@ public function testQuickStartInstallAndServerCommands() { ...@@ -249,7 +245,6 @@ public function testQuickStartInstallAndServerCommands() {
"--site-name='Test another site {$this->testDb->getDatabasePrefix()}'", "--site-name='Test another site {$this->testDb->getDatabasePrefix()}'",
]; ];
$install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$install_process->inheritEnvironmentVariables();
$install_process->setTimeout(500); $install_process->setTimeout(500);
$result = $install_process->run(); $result = $install_process->run();
$this->assertStringContainsString('Drupal is already installed.', $install_process->getOutput()); $this->assertStringContainsString('Drupal is already installed.', $install_process->getOutput());
...@@ -278,7 +273,6 @@ public function testQuickStartCommandProfileValidation() { ...@@ -278,7 +273,6 @@ public function testQuickStartCommandProfileValidation() {
"--site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login", "--site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login",
]; ];
$process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$process->inheritEnvironmentVariables();
$process->run(); $process->run();
$this->assertStringContainsString('\'umami\' is not a valid install profile. Did you mean \'demo_umami\'?', $process->getErrorOutput()); $this->assertStringContainsString('\'umami\' is not a valid install profile. Did you mean \'demo_umami\'?', $process->getErrorOutput());
} }
...@@ -294,7 +288,6 @@ public function testServerWithNoInstall() { ...@@ -294,7 +288,6 @@ public function testServerWithNoInstall() {
'--suppress-login', '--suppress-login',
]; ];
$server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]); $server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
$server_process->inheritEnvironmentVariables();
$server_process->run(); $server_process->run();
$this->assertStringContainsString('No installation found. Use the \'install\' command.', $server_process->getErrorOutput()); $this->assertStringContainsString('No installation found. Use the \'install\' command.', $server_process->getErrorOutput());
} }
......
...@@ -160,7 +160,6 @@ public static function getSkippedDeprecations() { ...@@ -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.', '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 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.', '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 "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 // The following deprecation is listed for Twig 2 compatibility when unit
// testing using \Symfony\Component\ErrorHandler\DebugClassLoader. // testing using \Symfony\Component\ErrorHandler\DebugClassLoader.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment