File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Doctrine \DBAL \Platforms \Keywords ;
4
6
5
7
use Doctrine \Deprecations \Deprecation ;
6
8
9
+ use function array_diff ;
7
10
use function array_merge ;
8
11
9
12
/**
@@ -30,12 +33,19 @@ public function getName()
30
33
/**
31
34
* {@inheritDoc}
32
35
*
33
- * @link https://dev.mysql.com/doc/refman/8.4/en/keywords.html#keywords-new-in-current-series
36
+ * @link https://dev.mysql.com/doc/refman/8.4/en/keywords.html
34
37
*/
35
38
protected function getKeywords ()
36
39
{
37
40
$ keywords = parent ::getKeywords ();
38
41
42
+ // Removed Keywords and Reserved Words
43
+ $ keywords = array_diff ($ keywords , [
44
+ 'MASTER_BIND ' ,
45
+ 'MASTER_SSL_VERIFY_SERVER_CERT ' ,
46
+ ]);
47
+
48
+ // New Keywords and Reserved Words
39
49
$ keywords = array_merge ($ keywords , [
40
50
'AUTO ' ,
41
51
'BERNOULLI ' ,
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Doctrine \DBAL \Tests \Platforms ;
6
+
7
+ use Doctrine \DBAL \Platforms \AbstractPlatform ;
8
+ use Doctrine \DBAL \Platforms \Keywords \KeywordList ;
9
+ use Doctrine \DBAL \Platforms \MySQL84Platform ;
10
+
11
+ class MySQL84PlatformTest extends MySQL57PlatformTest
12
+ {
13
+ public function createPlatform (): AbstractPlatform
14
+ {
15
+ return new MySQL84Platform ();
16
+ }
17
+
18
+ public function testMySQL84KeywordList (): void
19
+ {
20
+ $ keywordList = $ this ->platform ->getReservedKeywordsList ();
21
+ self ::assertInstanceOf (KeywordList::class, $ keywordList );
22
+
23
+ self ::assertTrue ($ keywordList ->isKeyword ('persist ' ));
24
+ self ::assertTrue ($ keywordList ->isKeyword ('manual ' ));
25
+ self ::assertFalse ($ keywordList ->isKeyword ('master_bind ' ));
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments