File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 99 "require-dev" : {
1010 "dibi/dibi" : " ~3.0 | ~4.0 | ~5.0" ,
1111 "doctrine/cache" : " ~1.11 | ~2.0" ,
12- "doctrine/dbal" : " ~ 2.5 | ~3 .0" ,
13- "doctrine/orm" : " ~2.5 " ,
12+ "doctrine/dbal" : " ^ 2.5 || ^3.0 || ^4 .0" ,
13+ "doctrine/orm" : " ^2.9 || ^3.0 " ,
1414 "mockery/mockery" : " ~1.3" ,
1515 "nette/database" : " ~2.4 | ~3.0" ,
1616 "nette/di" : " ~2.4.10 | ~3.0" ,
Original file line number Diff line number Diff line change @@ -44,30 +44,30 @@ public function exec(string $sql): int
4444
4545 public function escapeString (string $ value ): string
4646 {
47- return $ this ->conn ->quote ( $ value, ' string ' );
47+ return $ this ->conn ->getDatabasePlatform ()-> quoteStringLiteral ( $ value );
4848 }
4949
5050
5151 public function escapeInt (int $ value ): string
5252 {
53- return $ this -> conn -> quote ( $ value, ' integer ' ) ;
53+ return ( string ) $ value ;
5454 }
5555
5656
5757 public function escapeBool (bool $ value ): string
5858 {
59- return $ this ->conn -> quote ( $ value, ' boolean ' );
59+ return $ this ->escapeString (( string ) ( int ) $ value );
6060 }
6161
6262
6363 public function escapeDateTime (DateTimeInterface $ value ): string
6464 {
65- return $ this ->conn -> quote ( $ value , ' datetime ' );
65+ return $ this ->escapeString ( $ value -> format ( $ this -> conn -> getDatabasePlatform ()-> getDateTimeFormatString ()) );
6666 }
6767
6868
6969 public function escapeIdentifier (string $ value ): string
7070 {
71- return $ this ->conn ->quoteIdentifier ($ value );
71+ return $ this ->conn ->getDatabasePlatform ()-> quoteIdentifier ($ value );
7272 }
7373}
Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ public function generateContent(): string
5252 */
5353 protected function getUpdateQueries (): array
5454 {
55- $ cache = $ this ->entityManager ->getConfiguration ()->getMetadataCacheImpl ();
56- if ($ cache instanceof ClearableCache ) {
57- $ cache ->deleteAll ();
55+ $ cache = $ this ->entityManager ->getConfiguration ()->getMetadataCache ();
56+ if ($ cache !== null ) {
57+ $ cache ->clear ();
5858 }
5959
6060 $ schemaTool = new SchemaTool ($ this ->entityManager );
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ PHP_VERSION_MIN=" 80100"
3+ PHP_VERSION_MAX=" 80399"
4+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE doctrine/dbal:^4.0"
5+ COMPOSER_REQUIRE=" $COMPOSER_REQUIRE nette/tester:~2.3"
6+ DBAL=" doctrine"
You can’t perform that action at this time.
0 commit comments