Skip to content

Commit

Permalink
Revert "Set $_SERVER['SCRIPT_NAME'] within proxy command (composer#11562
Browse files Browse the repository at this point in the history
)"

This reverts commit 9c25633.
  • Loading branch information
mvorisek authored Sep 3, 2023
1 parent 90cbb14 commit 6200985
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions src/Composer/Installer/BinaryInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,6 @@ public function url_stat(\$path, \$flags)
$globalsCode
$streamProxyCode
if (__FILE__ === realpath(\$_SERVER['SCRIPT_NAME'])) {
\$_SERVER['SCRIPT_NAME'] = realpath($binPathExported);
}
return include $binPathExported;
PROXY;
Expand Down
12 changes: 0 additions & 12 deletions tests/Composer/Test/Installer/BinaryInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,6 @@ public static function executableBinaryProvider(): array
<?php declare(strict_types=1);
echo 'success '.$_SERVER['argv'][1];
EOL
],
'php file which validates $_SERVER["SCRIPT_NAME"]' => [<<<'EOL'
<?php
if (__FILE__ === realpath($_SERVER['SCRIPT_NAME'])) {
echo 'success '.$_SERVER['argv'][1];
} else {
fwrite(STDERR, "Test failure: __FILE__ does not match \$_SERVER['SCRIPT_NAME']\n");
fwrite(STDERR, "\t__FILE__:\t" . __FILE__ . "\n");
fwrite(STDERR, "\t\$_SERVER['SCRIPT_NAME']:\t" . $_SERVER['SCRIPT_NAME'] . "\n");
exit(1);
}
EOL
],
];
Expand Down

0 comments on commit 6200985

Please sign in to comment.