summaryrefslogtreecommitdiffstats
path: root/php-udan11-sql-parser-autoload.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-26 08:55:07 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-26 08:55:07 +0200
commit1506adcd3862f0d58f9bbf2c2a71f619314d239e (patch)
tree2705e3830ff08b84e60250ceab10f2a42f2b6926 /php-udan11-sql-parser-autoload.patch
parent3306cd5598623bc107df7b040516328d06b995b8 (diff)
php-udan11-sql-parser: 3.4.4
Diffstat (limited to 'php-udan11-sql-parser-autoload.patch')
-rw-r--r--php-udan11-sql-parser-autoload.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/php-udan11-sql-parser-autoload.patch b/php-udan11-sql-parser-autoload.patch
new file mode 100644
index 0000000..a6bd9da
--- /dev/null
+++ b/php-udan11-sql-parser-autoload.patch
@@ -0,0 +1,68 @@
+diff -up bin/highlight-query.rpm bin/highlight-query
+--- bin/highlight-query.rpm 2016-07-26 08:44:20.461742790 +0200
++++ bin/highlight-query 2016-07-26 08:44:57.594944077 +0200
+@@ -1,29 +1,7 @@
+ #!/usr/bin/env php
+ <?php
+
+-$files = array(
+- __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 -s http://getcomposer.org/installer | php" . PHP_EOL .
+- "php composer.phar install" . PHP_EOL
+- );
+-}
++require '/usr/share/php/SqlParser/autoload.php';
+
+ $cli = new SqlParser\Utils\CLI();
+ exit($cli->runHighlight());
+diff -up bin/lint-query.rpm bin/lint-query
+--- bin/lint-query.rpm 2016-07-26 08:44:29.869793788 +0200
++++ bin/lint-query 2016-07-26 08:45:05.123984889 +0200
+@@ -1,29 +1,7 @@
+ #!/usr/bin/env php
+ <?php
+
+-$files = array(
+- __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 -s http://getcomposer.org/installer | php" . PHP_EOL .
+- "php composer.phar install" . PHP_EOL
+- );
+-}
++require '/usr/share/php/SqlParser/autoload.php';
+
+ $cli = new SqlParser\Utils\CLI();
+ exit($cli->runLint());