- it changes namespace to follow PSR-4
"type": "project",
"bin": ["bin/php-sqllint"],
"require": {
"type": "project",
"bin": ["bin/php-sqllint"],
"require": {
- "phpmyadmin/sql-parser": "^3.0",
+ "phpmyadmin/sql-parser": "^4.1.1",
"pear/console_commandline": "^1.2"
},
"homepage": "http://cweiske.de/php-sqllint.htm",
"pear/console_commandline": "^1.2"
},
"homepage": "http://cweiske.de/php-sqllint.htm",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "1c18f83b6e7cd2794ed46ab1259603cf",
- "content-hash": "48867997935b86e96d572b0c195542ef",
+ "hash": "642c0759e68495342f0e4ec0a8b45575",
+ "content-hash": "e52fa298a0c5ce2ff75067ab99b00ce7",
"packages": [
{
"name": "pear/console_commandline",
"packages": [
{
"name": "pear/console_commandline",
},
{
"name": "phpmyadmin/sql-parser",
},
{
"name": "phpmyadmin/sql-parser",
"source": {
"type": "git",
"url": "https://github.com/phpmyadmin/sql-parser.git",
"source": {
"type": "git",
"url": "https://github.com/phpmyadmin/sql-parser.git",
- "reference": "5c0905149b38f3c68a5f0545efdcc33c687459ee"
+ "reference": "deac47217144b21056271674533b289239e1b279"
},
"dist": {
"type": "zip",
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/5c0905149b38f3c68a5f0545efdcc33c687459ee",
- "reference": "5c0905149b38f3c68a5f0545efdcc33c687459ee",
+ "url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/deac47217144b21056271674533b289239e1b279",
+ "reference": "deac47217144b21056271674533b289239e1b279",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3.0"
},
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3.0"
},
+ "conflict": {
+ "phpmyadmin/motranslator": "<3.0"
+ },
- "phpunit/php-code-coverage": "~2.0 || ~3.0",
- "phpunit/phpunit": "~4.8 || ~5.1"
+ "phpunit/php-code-coverage": "*",
+ "phpunit/phpunit": "~4.8 || ~5.7"
+ },
+ "suggest": {
+ "phpmyadmin/motranslator": "Translate messages to your favorite locale"
},
"bin": [
"bin/highlight-query",
},
"bin": [
"bin/highlight-query",
"type": "library",
"autoload": {
"psr-4": {
"type": "library",
"autoload": {
"psr-4": {
+ "PhpMyAdmin\\SqlParser\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
}
},
"notification-url": "https://packagist.org/downloads/",
- "time": "2016-10-03 16:28:09"
+ "time": "2017-07-12 14:54:33"
* @link http://cweiske.de/php-sqllint.htm
*/
namespace phpsqllint;
* @link http://cweiske.de/php-sqllint.htm
*/
namespace phpsqllint;
+use PhpMyAdmin\SqlParser\Parser;
require_once 'Console/CommandLine.php';
require_once 'Console/CommandLine.php';
- $parser = new \SqlParser\Parser($sql);
+ $parser = new \PhpMyAdmin\SqlParser\Parser($sql);
if (count($parser->errors) == 0) {
$this->renderer->finishOk();
return true;
if (count($parser->errors) == 0) {
$this->renderer->finishOk();
return true;
}
foreach ($parser->errors as $error) {
}
foreach ($parser->errors as $error) {
- /* @var SqlParser\Exceptions\ParserException $error) */
+ /* @var PhpMyAdmin\SqlParser\Exceptions\ParserException $error) */
reset($lines);
$line = 1;
while (next($lines) && $error->token->position >= current($lines)) {
reset($lines);
$line = 1;
while (next($lines) && $error->token->position >= current($lines)) {
$options = array(
'type' => $typeMap[$this->highlight],
);
$options = array(
'type' => $typeMap[$this->highlight],
);
- echo \SqlParser\Utils\Formatter::format($sql, $options) . "\n";
+ echo \PhpMyAdmin\SqlParser\Utils\Formatter::format($sql, $options) . "\n";
}
protected function loadSql($filename)
}
protected function loadSql($filename)