Skip to content

Commit

Permalink
Merge branch '4.4' into 5.4
Browse files Browse the repository at this point in the history
* 4.4:
  [FrameworkBundle] [Command] Fix `debug:router --no-interaction` error …
  [Intl] Update the ICU data to 71.1 - 4.4
  Add tests to messenger connection get for OraclePlatform
  [Process] Fix Process::getEnv() when setEnv() hasn't been called before
  [ExpressionLanguage] Fix matching null against a regular expression
  • Loading branch information
fabpot committed Apr 8, 2022
2 parents 38a44b2 + 9eedd60 commit 597f3ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Process implements \IteratorAggregate
private $hasCallback = false;
private $commandline;
private $cwd;
private $env;
private $env = [];
private $input;
private $starttime;
private $lastOutputTime;
Expand Down
5 changes: 4 additions & 1 deletion Tests/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1505,8 +1505,11 @@ public function testPreparedCommandWithNoValues()

public function testEnvArgument()
{
$env = ['FOO' => 'Foo', 'BAR' => 'Bar'];
$cmd = '\\' === \DIRECTORY_SEPARATOR ? 'echo !FOO! !BAR! !BAZ!' : 'echo $FOO $BAR $BAZ';
$p = Process::fromShellCommandline($cmd);
$this->assertSame([], $p->getEnv());

$env = ['FOO' => 'Foo', 'BAR' => 'Bar'];
$p = Process::fromShellCommandline($cmd, null, $env);
$p->run(null, ['BAR' => 'baR', 'BAZ' => 'baZ']);

Expand Down

0 comments on commit 597f3ff

Please sign in to comment.