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

For Contexts, rely on token constants + Add MySQL 8.4 context #569

4 changes: 4 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

<rule ref="PhpMyAdmin"/>

<rule ref="Generic.Files.LineLength.TooLong">
<exclude-pattern>src/Contexts/*</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.ControlStructures.RequireSingleLineCondition"/>
<rule ref="SlevomatCodingStandard.Functions.RequireSingleLineCall"/>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces">
Expand Down
7 changes: 1 addition & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,7 @@ parameters:
path: src/Tools/ContextGenerator.php

-
message: "#^Offset 'keywords' on array\\{name\\: string, class\\: string, link\\: string, keywords\\: array\\<int, array\\<int, array\\<int, string\\>\\>\\>\\} in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: src/Tools/ContextGenerator.php

-
message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#"
count: 1
path: src/Tools/ContextGenerator.php

Expand Down
21 changes: 11 additions & 10 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@
<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 Expand Up @@ -1049,16 +1054,12 @@
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Tools/ContextGenerator.php">
<InvalidArrayOffset>
<code><![CDATA[$version[count($version) - 1]]]></code>
</InvalidArrayOffset>
<PossiblyInvalidArgument>
<code><![CDATA[$options['keywords']]]></code>
</PossiblyInvalidArgument>
<RedundantCondition>
<code><![CDATA[++$i !== $count]]></code>
<code><![CDATA[++$i !== $count]]></code>
</RedundantCondition>
<MixedArgumentTypeCoercion>
<code><![CDATA[static fn (int $num): bool => ($type & $num) !== 0]]></code>
</MixedArgumentTypeCoercion>
<PossiblyFalseArgument>
<code><![CDATA[array_map(file(...), $files)]]></code>
</PossiblyFalseArgument>
</file>
<file src="src/Tools/CustomJsonSerializer.php">
<MixedAssignment>
Expand Down
1,157 changes: 881 additions & 276 deletions src/Contexts/ContextMariaDb100000.php

Large diffs are not rendered by default.

1,381 changes: 1,057 additions & 324 deletions src/Contexts/ContextMariaDb100100.php

Large diffs are not rendered by default.

1,384 changes: 1,059 additions & 325 deletions src/Contexts/ContextMariaDb100200.php

Large diffs are not rendered by default.

1,388 changes: 1,063 additions & 325 deletions src/Contexts/ContextMariaDb100300.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMariaDb100400.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMariaDb100500.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMariaDb100600.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb100700.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb100800.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb100900.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb101000.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb101100.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb110000.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb110100.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb110200.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb110300.php

Large diffs are not rendered by default.

1,390 changes: 1,065 additions & 325 deletions src/Contexts/ContextMariaDb110400.php

Large diffs are not rendered by default.

1,034 changes: 787 additions & 247 deletions src/Contexts/ContextMySql50000.php

Large diffs are not rendered by default.

1,139 changes: 869 additions & 270 deletions src/Contexts/ContextMySql50100.php

Large diffs are not rendered by default.

1,155 changes: 880 additions & 275 deletions src/Contexts/ContextMySql50500.php

Large diffs are not rendered by default.

1,284 changes: 983 additions & 301 deletions src/Contexts/ContextMySql50600.php

Large diffs are not rendered by default.

1,381 changes: 1,057 additions & 324 deletions src/Contexts/ContextMySql50700.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMySql80000.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMySql80100.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMySql80200.php

Large diffs are not rendered by default.

1,389 changes: 1,064 additions & 325 deletions src/Contexts/ContextMySql80300.php

Large diffs are not rendered by default.

Loading
Loading