diff options
author | Remi Collet <remi@remirepo.net> | 2019-09-02 14:45:14 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-09-02 14:45:14 +0200 |
commit | b6d403ca24b188b1570dc69dff1759161c9394f5 (patch) | |
tree | 367081761b910837f13cd911c9084df054723da0 /php-phpmyadmin-sql-parser5-autoload.patch |
duplicate v4 stuff
Diffstat (limited to 'php-phpmyadmin-sql-parser5-autoload.patch')
-rw-r--r-- | php-phpmyadmin-sql-parser5-autoload.patch | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/php-phpmyadmin-sql-parser5-autoload.patch b/php-phpmyadmin-sql-parser5-autoload.patch new file mode 100644 index 0000000..3cea924 --- /dev/null +++ b/php-phpmyadmin-sql-parser5-autoload.patch @@ -0,0 +1,114 @@ +diff -up ./bin/highlight-query.rpm ./bin/highlight-query +--- ./bin/highlight-query.rpm 2019-06-03 14:32:07.000000000 +0200 ++++ ./bin/highlight-query 2019-06-04 19:06:37.085484476 +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 PhpMyAdmin\SqlParser\Utils\CLI(); + exit($cli->runHighlight()); +diff -up ./bin/lint-query.rpm ./bin/lint-query +--- ./bin/lint-query.rpm 2019-06-03 14:32:07.000000000 +0200 ++++ ./bin/lint-query 2019-06-04 19:06:37.085484476 +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 PhpMyAdmin\SqlParser\Utils\CLI(); + exit($cli->runLint()); +diff -up ./bin/tokenize-query.rpm ./bin/tokenize-query +--- ./bin/tokenize-query.rpm 2019-06-04 19:08:04.886758030 +0200 ++++ ./bin/tokenize-query 2019-06-04 19:08:09.025766484 +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 PhpMyAdmin\SqlParser\Utils\CLI(); + exit($cli->runTokenize()); +diff -up ./src/Translator.php.rpm ./src/Translator.php +--- ./src/Translator.php.rpm 2019-06-03 14:32:07.000000000 +0200 ++++ ./src/Translator.php 2019-06-04 19:06:37.085484476 +0200 +@@ -40,7 +40,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 (is_null(self::$translator)) { |