Skip to content

Commit 4df50c6

Browse files
authored
Merge pull request #29 from moufmouf/1.2
Removing bundled PHPSQLParser
2 parents 5a90ee0 + 899adae commit 4df50c6

25 files changed

+161
-4317
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[![Latest Stable Version](https://poser.pugx.org/mouf/magic-query/v/stable)](https://packagist.org/packages/mouf/magic-query)
22
[![Latest Unstable Version](https://poser.pugx.org/mouf/magic-query/v/unstable)](https://packagist.org/packages/mouf/magic-query)
33
[![License](https://poser.pugx.org/mouf/magic-query/license)](https://packagist.org/packages/mouf/magic-query)
4-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/magic-query/badges/quality-score.png?b=1.1)](https://scrutinizer-ci.com/g/thecodingmachine/magic-query/?branch=1.1)
5-
[![Build Status](https://travis-ci.org/thecodingmachine/magic-query.svg?branch=1.1)](https://travis-ci.org/thecodingmachine/magic-query)
6-
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/magic-query/badge.svg?branch=1.1)](https://coveralls.io/r/thecodingmachine/magic-query?branch=1.1)
4+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/magic-query/badges/quality-score.png?b=1.2)](https://scrutinizer-ci.com/g/thecodingmachine/magic-query/?branch=1.2)
5+
[![Build Status](https://travis-ci.org/thecodingmachine/magic-query.svg?branch=1.2)](https://travis-ci.org/thecodingmachine/magic-query)
6+
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/magic-query/badge.svg?branch=1.2)](https://coveralls.io/r/thecodingmachine/magic-query?branch=1.2)
77

88
What is Magic-query?
99
====================
@@ -24,7 +24,7 @@ Simply use the composer package:
2424
```json
2525
{
2626
"require": {
27-
"mouf/magic-query": "~1.1"
27+
"mouf/magic-query": "^1.2"
2828
},
2929
"minimum-stability": "dev",
3030
"prefer-stable": true

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"mouf/utils.common.paginable-interface": "~1.0",
2020
"mouf/utils.common.sortable-interface": "~1.0",
2121
"mouf/schema-analyzer": "~1.0",
22-
"twig/twig": "~1.14"
22+
"twig/twig": "~1.14",
23+
"greenlion/php-sql-parser": "^4.0"
2324
},
2425
"require-dev": {
2526
"phpunit/phpunit": "~5.0",

src/Mouf/Database/MagicQuery.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Doctrine\Common\Cache\VoidCache;
66
use Mouf\Database\MagicQuery\Twig\SqlTwigEnvironmentFactory;
77
use Mouf\Database\SchemaAnalyzer\SchemaAnalyzer;
8+
use PHPSQLParser\PHPSQLParser;
89
use SQLParser\Node\ColRef;
910
use SQLParser\Node\Equal;
1011
use SQLParser\Node\NodeInterface;
@@ -105,7 +106,8 @@ public function parse($sql)
105106
$select = $this->cache->fetch($cacheKey);
106107

107108
if ($select === false) {
108-
$parser = new SQLParser();
109+
//$parser = new SQLParser();
110+
$parser = new PHPSQLParser();
109111
$parsed = $parser->parse($sql);
110112

111113
if ($parsed == false) {

src/SQLParser/ExpressionToken.php

Lines changed: 0 additions & 158 deletions
This file was deleted.

src/SQLParser/ExpressionType.php

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/SQLParser/InvalidParameterException.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/SQLParser/LexerSplitter.php

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)