diff -up ./bin/highlight-query.rpm ./bin/highlight-query --- ./bin/highlight-query.rpm 2021-12-09 05:31:52.000000000 +0100 +++ ./bin/highlight-query 2021-12-09 10:49:49.580910263 +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 2021-12-09 05:31:52.000000000 +0100 +++ ./bin/lint-query 2021-12-09 10:49:49.580910263 +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 2021-12-09 05:31:52.000000000 +0100 +++ ./bin/tokenize-query 2021-12-09 10:49:49.580910263 +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 2021-12-09 10:49:49.580910263 +0100 +++ ./src/Translator.php 2021-12-09 10:50:32.375725681 +0100 @@ -45,7 +45,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) {