Skip to content

Commit

Permalink
Merge branch '5.10.x'
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <[email protected]>
  • Loading branch information
MauricioFauth committed Aug 26, 2024
2 parents 6bbea5b + 99b9f38 commit 4c4d552
Show file tree
Hide file tree
Showing 101 changed files with 10,750 additions and 1,757 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
- Move `Misc::getAliases()` into `SelectStatement::getAliases()` (#454)
- Drop `USE_UTF_STRINGS` constant (#471)

## [5.10.0] - YYYY-MM-DD

- Improve context files by using constants (#570)
- Support parsing KILL statements (#556)
- Fix query flags for lower-case functions (#564)
- Allow using `::class` keyword to load a context (#571)

## [5.9.1] - 2024-08-13

- Allow parsing ALTER TABLE statement with column check constraint (#554)
Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,6 @@ parameters:
count: 1
path: src/Statement.php

-
message: "#^Access to an undefined property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$processListId\\.$#"
count: 1
path: src/Statement.php

-
message: "#^Access to an undefined property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$renames\\.$#"
count: 1
Expand Down Expand Up @@ -620,11 +615,6 @@ parameters:
count: 1
path: src/Statements/SelectStatement.php

-
message: "#^Access to an undefined property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$processListId\\.$#"
count: 1
path: src/Statements/SelectStatement.php

-
message: "#^Access to an undefined property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$renames\\.$#"
count: 1
Expand Down
130 changes: 0 additions & 130 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,136 +167,6 @@
<code><![CDATA[static::isKeyword($str, true)]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Contexts/ContextMariaDb100000.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100000]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100100.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100100]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100200.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100200]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100300.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100300]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100400.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100400]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100500.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100500]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100600.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100600]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100700.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100700]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100800.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100800]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb100900.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb100900]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb101000.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb101000]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb101100.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb101100]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb110000.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb110000]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb110100.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb110100]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb110200.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb110200]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb110300.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb110300]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMariaDb110400.php">
<UnusedClass>
<code><![CDATA[ContextMariaDb110400]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql50000.php">
<UnusedClass>
<code><![CDATA[ContextMySql50000]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql50100.php">
<UnusedClass>
<code><![CDATA[ContextMySql50100]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql50500.php">
<UnusedClass>
<code><![CDATA[ContextMySql50500]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql50600.php">
<UnusedClass>
<code><![CDATA[ContextMySql50600]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql80000.php">
<UnusedClass>
<code><![CDATA[ContextMySql80000]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql80100.php">
<UnusedClass>
<code><![CDATA[ContextMySql80100]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql80200.php">
<UnusedClass>
<code><![CDATA[ContextMySql80200]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql80300.php">
<UnusedClass>
<code><![CDATA[ContextMySql80300]]></code>
</UnusedClass>
</file>
<file src="src/Contexts/ContextMySql80400.php">
<UnusedClass>
<code><![CDATA[ContextMySql80400]]></code>
</UnusedClass>
</file>
<file src="src/Lexer.php">
<LoopInvalidation>
<code><![CDATA[$this->last]]></code>
Expand Down
9 changes: 7 additions & 2 deletions src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,13 @@ public static function load(string $context = ''): bool
return false;
}

// Short context name (must be formatted into class name).
$context = self::$contextPrefix . $context;
// Could be the fully qualified class name was given, like `ContextDBMS::class`.
if (class_exists('\\' . $context)) {
$context = '\\' . $context;
} else {
// Short context name (must be formatted into class name).
$context = self::$contextPrefix . $context;
}
}

self::$loadedContext = $context;
Expand Down
Loading

0 comments on commit 4c4d552

Please sign in to comment.