summaryrefslogtreecommitdiffstats
path: root/php-phpmyadmin-sql-parser5-autoload.patch
blob: 34a6030a521e341eda73a2acc167495b7fd2ed65 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
diff -up ./bin/highlight-query.rpm ./bin/highlight-query
--- ./bin/highlight-query.rpm	2020-01-08 07:34:11.970216276 +0100
+++ ./bin/highlight-query	2020-01-08 07:35:49.464106360 +0100
@@ -2,29 +2,7 @@
 <?php
 declare(strict_types=1);
 
-$files = [
-    __DIR__ . "/../vendor/autoload.php",
-    __DIR__ . "/../../vendor/autoload.php",
-    __DIR__ . "/../../../autoload.php",
-    "vendor/autoload.php"
-];
-
-$found = false;
-foreach ($files as $file) {
-    if (file_exists($file)) {
-        require_once $file;
-        $found = true;
-        break;
-    }
-}
-
-if (!$found) {
-    die(
-        "You need to set up the project dependencies using the following commands:" . PHP_EOL .
-        "curl -sS https://getcomposer.org/installer | php" . PHP_EOL .
-        "php composer.phar install" . PHP_EOL
-    );
-}
+require '/usr/share/php/PhpMyAdmin/SqlParser5/autoload.php';
 
 $cli = new PhpMyAdmin\SqlParser\Utils\CLI();
 exit($cli->runHighlight());
diff -up ./bin/lint-query.rpm ./bin/lint-query
--- ./bin/lint-query.rpm	2020-01-08 07:34:11.970216276 +0100
+++ ./bin/lint-query	2020-01-08 07:36:02.913951007 +0100
@@ -2,29 +2,7 @@
 <?php
 declare(strict_types=1);
 
-$files = [
-    __DIR__ . "/../vendor/autoload.php",
-    __DIR__ . "/../../vendor/autoload.php",
-    __DIR__ . "/../../../autoload.php",
-    "vendor/autoload.php"
-];
-
-$found = false;
-foreach ($files as $file) {
-    if (file_exists($file)) {
-        require_once $file;
-        $found = true;
-        break;
-    }
-}
-
-if (!$found) {
-    die(
-        "You need to set up the project dependencies using the following commands:" . PHP_EOL .
-        "curl -sS https://getcomposer.org/installer | php" . PHP_EOL .
-        "php composer.phar install" . PHP_EOL
-    );
-}
+require '/usr/share/php/PhpMyAdmin/SqlParser5/autoload.php';
 
 $cli = new PhpMyAdmin\SqlParser\Utils\CLI();
 exit($cli->runLint());
diff -up ./bin/tokenize-query.rpm ./bin/tokenize-query
--- ./bin/tokenize-query.rpm	2020-01-08 07:34:11.970216276 +0100
+++ ./bin/tokenize-query	2020-01-08 07:36:16.233799679 +0100
@@ -2,29 +2,7 @@
 <?php
 declare(strict_types=1);
 
-$files = [
-    __DIR__ . "/../vendor/autoload.php",
-    __DIR__ . "/../../vendor/autoload.php",
-    __DIR__ . "/../../../autoload.php",
-    "vendor/autoload.php"
-];
-
-$found = false;
-foreach ($files as $file) {
-    if (file_exists($file)) {
-        require_once $file;
-        $found = true;
-        break;
-    }
-}
-
-if (!$found) {
-    die(
-        "You need to set up the project dependencies using the following commands:" . PHP_EOL .
-        "curl -sS https://getcomposer.org/installer | php" . PHP_EOL .
-        "php composer.phar install" . PHP_EOL
-    );
-}
+require '/usr/share/php/PhpMyAdmin/SqlParser5/autoload.php';
 
 $cli = new PhpMyAdmin\SqlParser\Utils\CLI();
 exit($cli->runTokenize());
diff -up ./src/Translator.php.rpm ./src/Translator.php
--- ./src/Translator.php.rpm	2020-01-08 07:34:11.970216276 +0100
+++ ./src/Translator.php	2020-01-08 07:37:02.060280464 +0100
@@ -42,7 +42,7 @@ class Translator
             self::$loader->textdomain('sqlparser');
 
             // Set path where to look for a domain
-            self::$loader->bindtextdomain('sqlparser', __DIR__ . '/../locale/');
+            self::$loader->bindtextdomain('sqlparser', __DIR__ . '/locale/');
         }
 
         if (self::$translator === null) {