summaryrefslogtreecommitdiffstats
path: root/php-8.1.0-parser.patch
blob: f443f1da8b7244688c9cae02c98786a5099efc63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php
--- ./build/gen_stub.php.syslib	2020-06-25 08:11:51.782046813 +0200
+++ ./build/gen_stub.php	2020-06-25 08:13:11.188860368 +0200
@@ -1075,6 +1075,12 @@ function initPhpParser() {
     }
 
     $isInitialized = true;
+
+    if (file_exists('/usr/share/php/PhpParser4/autoload.php')) {
+        require_once '/usr/share/php/PhpParser4/autoload.php';
+        return;
+    }
+
     $version = "4.12.0";
     $phpParserDir = __DIR__ . "/PHP-Parser-$version";
     if (!is_dir($phpParserDir)) {