diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-01-23 13:38:19 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-01-23 13:38:19 +0100 |
commit | e20a8b3b37f02df6630f6671a90fd0afb0a99af8 (patch) | |
tree | 8cee834988ba3e69f856aeec5b031a36c46b5894 /php-phpmyadmin-sql-parser-autoload.patch |
php-phpmyadmin-sql-parser: 4.0.0, New package
Diffstat (limited to 'php-phpmyadmin-sql-parser-autoload.patch')
-rw-r--r-- | php-phpmyadmin-sql-parser-autoload.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/php-phpmyadmin-sql-parser-autoload.patch b/php-phpmyadmin-sql-parser-autoload.patch new file mode 100644 index 0000000..3c80486 --- /dev/null +++ b/php-phpmyadmin-sql-parser-autoload.patch @@ -0,0 +1,68 @@ +diff -up bin/highlight-query.rpm bin/highlight-query +--- bin/highlight-query.rpm 2016-09-13 13:04:29.517214693 +0200 ++++ bin/highlight-query 2016-09-13 13:05:35.400519256 +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 -sS https://getcomposer.org/installer | php" . PHP_EOL . +- "php composer.phar install" . PHP_EOL +- ); +-} ++require '/usr/share/php/PhpMyAdmin/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-09-13 13:04:29.517214693 +0200 ++++ bin/lint-query 2016-09-13 13:05:58.585626435 +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 -sS https://getcomposer.org/installer | php" . PHP_EOL . +- "php composer.phar install" . PHP_EOL +- ); +-} ++require '/usr/share/php/PhpMyAdmin/SqlParser/autoload.php'; + + $cli = new SqlParser\Utils\CLI(); + exit($cli->runLint()); |