7
7
use Doctrine \DBAL \Connection ;
8
8
use Doctrine \DBAL \Platforms \AbstractPlatform ;
9
9
use Doctrine \DBAL \Types \Type ;
10
+ use Doctrine \DBAL \Types \Types ;
10
11
use Doctrine \ORM \EntityManager ;
11
12
use Doctrine \ORM \Event \OnFlushEventArgs ;
12
13
use Doctrine \ORM \Event \PostPersistEventArgs ;
15
16
use Doctrine \ORM \UnitOfWork ;
16
17
use Doctrine \ORM \Utility \PersisterHelper ;
17
18
use LogicException ;
18
- use PDO ;
19
19
20
20
/**
21
21
* Based on the work of
@@ -210,7 +210,7 @@ private function getRevisionId(ClassMetadata $class, $entityData, $revType): int
210
210
211
211
private function saveRevisionEntityData (ClassMetadata $ class , array $ entityData , string $ revType ): void {
212
212
$ params = [$ this ->getRevisionId ($ class , $ entityData , $ revType ), $ revType ];
213
- $ types = [PDO :: PARAM_INT , PDO :: PARAM_STR ];
213
+ $ types = [Types:: INTEGER , Types:: STRING ];
214
214
215
215
$ fields = [];
216
216
@@ -228,7 +228,7 @@ private function saveRevisionEntityData(ClassMetadata $class, array $entityData,
228
228
$ fields [$ sourceColumn ] = true ;
229
229
if ($ entityData [$ field ] === NULL ) {
230
230
$ params [] = NULL ;
231
- $ types [] = PDO :: PARAM_STR ;
231
+ $ types [] = Types:: STRING ;
232
232
} else {
233
233
$ params [] = $ relatedId [$ targetClass ->fieldNames [$ targetColumn ]];
234
234
$ types [] = PersisterHelper::getTypeOfColumn ($ targetColumn , $ targetClass , $ this ->em );
0 commit comments