Update to SQL Parser 4.1.9
authorMichal Čihař <michal@cihar.com>
Mon, 23 Jan 2017 13:38:36 +0000 (14:38 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 27 Jul 2017 18:21:31 +0000 (20:21 +0200)
- it changes namespace to follow PSR-4

composer.json
composer.lock
src/phpsqllint/Cli.php

index 98171697e8e681bf99c2bb4e4234d4eebfa889a7..bde2da14d0a3302fda4faa3e24f5cecf72824624 100644 (file)
@@ -4,7 +4,7 @@
     "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",
index 49380ec99788089f7f435a402ca0cba8605a0ba0..a30dda3bf672c14ecb68bf14fbd935a867d4f840 100644 (file)
@@ -4,8 +4,8 @@
         "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",
         },
         {
             "name": "phpmyadmin/sql-parser",
-            "version": "v3.4.10",
+            "version": "v4.1.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpmyadmin/sql-parser.git",
-                "reference": "5c0905149b38f3c68a5f0545efdcc33c687459ee"
+                "reference": "deac47217144b21056271674533b289239e1b279"
             },
             "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"
             },
+            "conflict": {
+                "phpmyadmin/motranslator": "<3.0"
+            },
             "require-dev": {
-                "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",
             "type": "library",
             "autoload": {
                 "psr-4": {
-                    "SqlParser\\": "src"
+                    "PhpMyAdmin\\SqlParser\\": "src"
                 }
             },
             "notification-url": "https://packagist.org/downloads/",
                 "parser",
                 "sql"
             ],
-            "time": "2016-10-03 16:28:09"
+            "time": "2017-07-12 14:54:33"
         }
     ],
     "packages-dev": [],
index 4edcf666c777db965c544c1840aa0967f28150b8..eecc9b789617be9826915d1e7db5e21547eda76c 100644 (file)
@@ -11,7 +11,7 @@
  * @link     http://cweiske.de/php-sqllint.htm
  */
 namespace phpsqllint;
-use SqlParser\Parser;
+use PhpMyAdmin\SqlParser\Parser;
 
 require_once 'Console/CommandLine.php';
 
@@ -84,7 +84,7 @@ class Cli
             return false;
         }
 
-        $parser = new \SqlParser\Parser($sql);
+        $parser = new \PhpMyAdmin\SqlParser\Parser($sql);
         if (count($parser->errors) == 0) {
             $this->renderer->finishOk();
             return true;
@@ -98,7 +98,7 @@ class Cli
         }
 
         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)) {
@@ -137,7 +137,7 @@ class Cli
         $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)