8000 bug #27902 Fix the detection of the Process new argument (stof) · symfony/symfony@0fcc874 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fcc874

Browse files
bug #27902 Fix the detection of the Process new argument (stof)
This PR was merged into the 3.4 branch. Discussion ---------- Fix the detection of the Process new argument | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a This fixes the detection of the new method signature when triggering the deprecation warning. The new `$env` parameter is the second argument, not the first one. Commits ------- 57e95f3 Fix the detection of the Process new argument
2 parents 4c7f29f + 57e95f3 commit 0fcc874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function start(callable $callback = null/*, array $env = array()*/)
272272
} else {
273273
if (__CLASS__ !== static::class) {
274274
$r = new \ReflectionMethod($this, __FUNCTION__);
275-
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[0]->name)) {
275+
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[1]->name)) {
276276
@trigger_error(sprintf('The %s::start() method expects a second "$env" argument since Symfony 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED);
277277
}
278278
}

0 commit comments

Comments
 (0)
0