Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0852e66

Browse files
[Process] Inherit env vars by default
1 parent613910b commit0852e66

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

‎src/Symfony/Component/BrowserKit/Client.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ public function request($method, $uri, array $parameters = array(), array $files
334334
*/
335335
protectedfunctiondoRequestInProcess($request)
336336
{
337-
// We set the TMPDIR (for Macs) and TEMP (for Windows), because on these platforms the temp directory changes based on the user.
338-
$process =newPhpProcess($this->getScript($request),null,array('TMPDIR' =>sys_get_temp_dir(),'TEMP' =>sys_get_temp_dir()));
337+
$process =newPhpProcess($this->getScript($request),null,null);
339338
$process->run();
340339

341340
if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/',$process->getOutput())) {

‎src/Symfony/Component/BrowserKit/composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"symfony/dom-crawler":"~2.0,>=2.0.5"
2121
},
2222
"require-dev": {
23-
"symfony/process":"~2.0,>=2.0.5",
23+
"symfony/process":"~2.3.34|~2.7,>=2.7.6",
2424
"symfony/css-selector":"~2.0,>=2.0.5"
2525
},
2626
"suggest": {

‎src/Symfony/Component/ClassLoader/ClassCollectionLoader.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ private static function getClassHierarchy(\ReflectionClass $class)
283283

284284
$traits =array();
285285

286-
if (function_exists('get_declared_traits')) {
286+
if (method_exists('ReflectionClass','getTraits')) {
287287
foreach ($classesas$c) {
288288
foreach (self::resolveDependencies(self::computeTraitDeps($c),$c)as$trait) {
289289
if ($trait !==$c) {

‎src/Symfony/Component/Process/PhpProcess.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class PhpProcess extends Process
2727
/**
2828
* Constructor.
2929
*
30-
* @param string $script The PHP script to run (as a string)
31-
* @param string $cwd The working directory
32-
* @param array $env The environment variables
33-
* @param int $timeout The timeout in seconds
34-
* @param array $options An array of options for proc_open
30+
* @param string$script The PHP script to run (as a string)
31+
* @param string|null $cwd The working directory
32+
* @param array|null $env The environment variables
33+
* @param int$timeout The timeout in seconds
34+
* @param array$options An array of options for proc_open
3535
*/
36-
publicfunction__construct($script,$cwd =null,array$env =array(),$timeout =60,array$options =array())
36+
publicfunction__construct($script,$cwd =null,array$env =null,$timeout =60,array$options =array())
3737
{
3838
$executableFinder =newPhpExecutableFinder();
3939
if (false ===$php =$executableFinder->find()) {

‎src/Symfony/Component/Process/Process.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ public function setEnv(array $env)
851851

852852
$this->env =array();
853853
foreach ($envas$key =>$value) {
854-
$this->env[(binary)$key] = (binary)$value;
854+
$this->env[$key] = (string)$value;
855855
}
856856

857857
return$this;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp