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

Appearance settings

Commit 11ccd92

Browse filesBrowse files
committed
#25187 Lookup php binary in PHP_BINDIR first
1 parent 37baa1d commit 11ccd92
Copy full SHA for 11ccd92

File tree

Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/PhpExecutableFinder.php
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,19 @@ public function find($includeArgs = true)
6262
}
6363
}
6464

65-
$dirs = array(PHP_BINDIR);
65+
$dirs = array();
6666
if ('\\' === DIRECTORY_SEPARATOR) {
6767
$dirs[] = 'C:\xampp\php\\';
6868
}
6969

70+
$name = 'php';
71+
foreach (array('', '.exe', '.bat', '.cmd', '.com') as $suffix) {
72+
if (@is_file($file = PHP_BINDIR.DIRECTORY_SEPARATOR.$name.$suffix) &&
73+
('\\' === DIRECTORY_SEPARATOR || is_executable($file))) {
74+
return $file;
75+
}
76+
}
77+
7078
return $this->executableFinder->find('php', false, $dirs);
7179
}
7280

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.