Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing MySQL 9.0 and MariaDB 11.5 contexts. #576

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,9 @@
<file src="src/Contexts/ContextMariaDb110400.php">
<PropertyTypeCoercion occurrences="1"/>
</file>
<file src="src/Contexts/ContextMariaDb110500.php">
<PropertyTypeCoercion occurrences="1"/>
</file>
<file src="src/Contexts/ContextMySql50000.php">
<PropertyTypeCoercion occurrences="1"/>
</file>
Expand Down Expand Up @@ -659,6 +662,9 @@
<file src="src/Contexts/ContextMySql80400.php">
<PropertyTypeCoercion occurrences="1"/>
</file>
<file src="src/Contexts/ContextMySql90000.php">
<PropertyTypeCoercion occurrences="1"/>
</file>
<file src="src/Lexer.php">
<LoopInvalidation occurrences="3">
<code>$this-&gt;last</code>
Expand Down
1,096 changes: 1,096 additions & 0 deletions src/Contexts/ContextMariaDb110500.php

Large diffs are not rendered by default.

1,090 changes: 1,090 additions & 0 deletions src/Contexts/ContextMySql90000.php

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Tools/ContextGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ContextGenerator
'MySql80200' => 'https://dev.mysql.com/doc/refman/8.2/en/keywords.html',
'MySql80300' => 'https://dev.mysql.com/doc/refman/8.3/en/keywords.html',
'MySql80400' => 'https://dev.mysql.com/doc/refman/8.4/en/keywords.html',
'MySql90000' => 'https://dev.mysql.com/doc/refman/9.0/en/keywords.html',
'MariaDb100000' => 'https://mariadb.com/kb/en/reserved-words/',
'MariaDb100100' => 'https://mariadb.com/kb/en/reserved-words/',
'MariaDb100200' => 'https://mariadb.com/kb/en/reserved-words/',
Expand All @@ -82,6 +83,7 @@ class ContextGenerator
'MariaDb110200' => 'https://mariadb.com/kb/en/reserved-words/',
'MariaDb110300' => 'https://mariadb.com/kb/en/reserved-words/',
'MariaDb110400' => 'https://mariadb.com/kb/en/reserved-words/',
'MariaDb110500' => 'https://mariadb.com/kb/en/reserved-words/',
];

/**
Expand Down
8 changes: 7 additions & 1 deletion tests/Lexer/ContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static function contextLoadingProvider(): array
'MySql50700',
],
'MySQL fallback' => [
'MySql99999',
'MySql9897969594',
'MySql50700',
],
'MariaDB match' => [
Expand Down Expand Up @@ -114,6 +114,8 @@ public static function contextNamesProvider(): array
['MySql80100'],
['MySql80200'],
['MySql80300'],
['MySql80400'],
['MySql90000'],
['MariaDb100000'],
['MariaDb100100'],
['MariaDb100200'],
Expand All @@ -131,6 +133,7 @@ public static function contextNamesProvider(): array
['MariaDb110200'],
['MariaDb110300'],
['MariaDb110400'],
['MariaDb110500'],
];
}

Expand Down Expand Up @@ -161,6 +164,8 @@ public function contextClassesProvider(): array
[Contexts\ContextMySql80100::class],
[Contexts\ContextMySql80200::class],
[Contexts\ContextMySql80300::class],
[Contexts\ContextMySql80400::class],
[Contexts\ContextMySql90000::class],
[Contexts\ContextMariaDb100000::class],
[Contexts\ContextMariaDb100100::class],
[Contexts\ContextMariaDb100200::class],
Expand All @@ -178,6 +183,7 @@ public function contextClassesProvider(): array
[Contexts\ContextMariaDb110200::class],
[Contexts\ContextMariaDb110300::class],
[Contexts\ContextMariaDb110400::class],
[Contexts\ContextMariaDb110500::class],
];
}

Expand Down
Loading
Loading