Skip to content

Commit c1e4bb8

Browse files
committed
merged branch patrickallaert/issue-8455 (PR #8456)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8456). Discussion ---------- [Process] Fixed #8455: PhpExecutableFinder::find() does not always return the correct binary Since `PHP_BINARY` is the very first approach considered, there is no way to use a workaround like setting the `PHP_PATH`. Checking `PHP_PATH` could potentially be put before checking `PHP_BINARY`: that would avoid an extra function call (and system call), at the price of a small BC_BREAK, but I think it's better in this case to have a solution that doesn't force people to set the `PHP_PATH` environment variable. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #8455 | License | MIT | Doc PR | none Commits ------- 35a2fe4 [Process] Fixed #8455: PhpExecutableFinder::find() does not always return the correct binary
2 parents d8b42aa + a2eca45 commit c1e4bb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Process/PhpExecutableFinder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct()
3434
public function find()
3535
{
3636
// PHP_BINARY return the current sapi executable
37-
if (defined('PHP_BINARY') && PHP_BINARY && ('cli' === PHP_SAPI)) {
37+
if (defined('PHP_BINARY') && PHP_BINARY && ('cli' === PHP_SAPI) && is_file(PHP_BINARY)) {
3838
return PHP_BINARY;
3939
}
4040

0 commit comments

Comments
 (0)