File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tests/Type/Doctrine/Query Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 6
6
use DateTime ;
7
7
use DateTimeImmutable ;
8
8
use Doctrine \Common \Collections \ArrayCollection ;
9
+ use Doctrine \DBAL \Platforms \SqlitePlatform ;
9
10
use Doctrine \ORM \EntityManagerInterface ;
10
11
use Doctrine \ORM \Mapping \Column ;
11
12
use Doctrine \ORM \Query \AST \TypedExpression ;
48
49
use function count ;
49
50
use function property_exists ;
50
51
use function sprintf ;
52
+ use function strpos ;
51
53
use function version_compare ;
52
54
use const PHP_VERSION_ID ;
53
55
@@ -1310,6 +1312,8 @@ public function getTestData(): iterable
1310
1312
' ,
1311
1313
];
1312
1314
1315
+ // There is no error after the merge of https://github.com/doctrine/dbal/pull/5755
1316
+ $ moduloError = strpos ((new SqlitePlatform ())->getModExpression ('' , '' ), '% ' ) === false ;
1313
1317
yield 'mod function error ' => [
1314
1318
$ this ->constantArray ([
1315
1319
[new ConstantIntegerType (1 ), TypeCombinator::addNull ($ this ->uintStringified ())],
@@ -1318,7 +1322,7 @@ public function getTestData(): iterable
1318
1322
SELECT MOD(10, NULLIF(m.intColumn, m.intColumn))
1319
1323
FROM QueryResult\Entities\Many m
1320
1324
' ,
1321
- PHP_VERSION_ID < 70400 ? 'Modulo by zero ' : null ,
1325
+ $ moduloError ? 'Modulo by zero ' : null ,
1322
1326
];
1323
1327
1324
1328
yield 'substring function ' => [
You can’t perform that action at this time.
0 commit comments