summarylogtreecommitdiffstats
path: root/php82.patch
blob: b389dd6ef0e70b1be9e3e84263c82eaf3f9b6088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff -ruN bin/compile bin/compile
--- bin/compile	2023-05-01 05:33:18.174782834 +0500
+++ bin/compile	2023-05-01 05:36:31.393772146 +0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/env php82
 <?php
 
 $cwd = getcwd();
@@ -11,17 +11,17 @@
 }
 // Install with the current version to force it having the right ClassLoader version
 // Install without dev packages to clean up the included classmap from phpunit classes
-exec('php bin/composer config autoloader-suffix ComposerPhar' . $ts, $output, $result);
+exec('php82 bin/composer config autoloader-suffix ComposerPhar' . $ts, $output, $result);
 if (0 !== $result) {
     echo 'Could not set the autoloader suffix, make sure exec is allowed and php can be found in your PATH';
     exit(1);
 }
-exec('php bin/composer install -q --no-dev', $output, $result);
+exec('php82 bin/composer install -q --no-dev', $output, $result);
 if (0 !== $result) {
     echo 'Could not remove dev deps, make sure exec is allowed and php can be found in your PATH';
     exit(1);
 }
-exec('php bin/composer config autoloader-suffix --unset', $output, $result);
+exec('php82 bin/composer config autoloader-suffix --unset', $output, $result);
 if (0 !== $result) {
     echo 'Could not remove the autoloader suffix, make sure exec is allowed and php can be found in your PATH';
     exit(1);
diff -ruN bin/composer bin/composer
--- bin/composer	2023-05-01 05:33:11.485783204 +0500
+++ bin/composer	2023-05-01 05:34:19.993779414 +0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/env php82
 <?php
 
 if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
diff -ruN src/Composer/Compiler.php src/Composer/Compiler.php
--- src/Composer/Compiler.php	2023-05-01 06:31:23.826590032 +0500
+++ src/Composer/Compiler.php	2023-05-01 06:30:46.012592123 +0500
@@ -234,7 +234,7 @@
     private function addComposerBin(\Phar $phar): void
     {
         $content = file_get_contents(__DIR__.'/../../bin/composer');
-        $content = Preg::replace('{^#!/usr/bin/env php\s*}', '', $content);
+        $content = Preg::replace('{^#!/usr/bin/env php82\s*}', '', $content);
         $phar->addFromString('bin/composer', $content);
     }
 
@@ -275,7 +275,7 @@
     private function getStub(): string
     {
         $stub = <<<'EOF'
-#!/usr/bin/env php
+#!/usr/bin/env php82
 <?php
 /*
  * This file is part of Composer.