We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ae50fe commit de7881fCopy full SHA for de7881f
bin/composer-script/Script.php
@@ -51,11 +51,9 @@ public static function runConsole(array $command): int
51
*/
52
public static function runPHP(array $command): int
53
{
54
- // for windows systems add the interpreter
55
- if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
56
- array_unshift($command, 'php');
57
- }
58
-
+ // Always add the interpreter to make sure scripts are run with the same php version
+ array_unshift($command, PHP_BINARY);
+
59
if (version_compare(Composer::getVersion(), '2.3-dev', '<')) {
60
// Composer 2.2.x or lower
61
/* @phpstan-ignore-next-line */
0 commit comments