File tree 4 files changed +16
-3
lines changed
4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 7
7
use Doctrine \Common \EventManager ;
8
8
use Doctrine \DBAL \Platforms ;
9
9
use Doctrine \DBAL \Platforms \AbstractPlatform ;
10
+ use Doctrine \DBAL \Platforms \MySQLPlatform ;
11
+ use Doctrine \DBAL \Platforms \MySqlPlatform as LegacyMySqlPlatform ;
12
+ use Doctrine \DBAL \Platforms \SqlitePlatform ;
13
+ use Doctrine \DBAL \Platforms \SQLServerPlatform ;
10
14
use Doctrine \Deprecations \Deprecation ;
11
15
use Doctrine \ORM \EntityManagerInterface ;
12
16
use Doctrine \ORM \Event \LoadClassMetadataEventArgs ;
@@ -621,9 +625,11 @@ private function completeIdGeneratorMapping(ClassMetadataInfo $class): void
621
625
case ClassMetadata::GENERATOR_TYPE_IDENTITY :
622
626
$ sequenceName = null ;
623
627
$ fieldName = $ class ->identifier ? $ class ->getSingleIdentifierFieldName () : null ;
628
+ $ platform = $ this ->getTargetPlatform ();
624
629
625
630
// Platforms that do not have native IDENTITY support need a sequence to emulate this behaviour.
626
- if ($ this ->getTargetPlatform ()->usesSequenceEmulatedIdentityColumns ()) {
631
+ /** @psalm-suppress UndefinedClass, InvalidClass */
632
+ if (! $ platform instanceof SqlitePlatform && ! $ platform instanceof MySQLPlatform && ! $ platform instanceof LegacyMySqlPlatform && ! $ platform instanceof SQLServerPlatform && $ platform ->usesSequenceEmulatedIdentityColumns ()) {
627
633
Deprecation::trigger (
628
634
'doctrine/orm ' ,
629
635
'https://github.com/doctrine/orm/issues/8850 ' ,
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ parameters:
13
13
-
14
14
message : ' /Doctrine\\DBAL\\Platforms\\MyS(ql|QL)Platform/'
15
15
path : lib/Doctrine/ORM/Internal/SQLResultCasing.php
16
+ -
17
+ message : ' /Doctrine\\DBAL\\Platforms\\MyS(ql|QL)Platform/'
18
+ path : lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
16
19
17
20
# Forward compatibility for DBAL 3.5
18
21
- '/^Call to an undefined method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getAlterSchemaSQL\ (\ ).$/'
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ parameters:
17
17
-
18
18
message : ' /Doctrine\\DBAL\\Platforms\\MyS(ql|QL)Platform/'
19
19
path : lib/Doctrine/ORM/Internal/SQLResultCasing.php
20
-
20
+ -
21
+ message : ' /Doctrine\\DBAL\\Platforms\\MyS(ql|QL)Platform/'
22
+ path : lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
21
23
-
22
24
message : ' /^Call to an undefined method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getSQLResultCasing\(\)\.$/'
23
25
path : lib/Doctrine/ORM/Internal/SQLResultCasing.php
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ parameters:
17
17
-
18
18
message : ' /Doctrine\\DBAL\\Platforms\\MyS(ql|QL)Platform/'
19
19
path : lib/Doctrine/ORM/Internal/SQLResultCasing.php
20
-
20
+ -
21
+ message : ' /Doctrine\\DBAL\\Platforms\\MyS(ql|QL)Platform/'
22
+ path : lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
21
23
-
22
24
message : ' /^Call to an undefined method Doctrine\\DBAL\\Platforms\\AbstractPlatform::getSQLResultCasing\(\)\.$/'
23
25
path : lib/Doctrine/ORM/Internal/SQLResultCasing.php
You can’t perform that action at this time.
0 commit comments