Skip to content

Commit d951254

Browse files
committed
Allow PHP errors in specific test to workaround Doctrine parser bug
1 parent bcb451f commit d951254

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/Rules/Doctrine/ORM/DqlRuleTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,10 @@ public function testRule(): void
5252
]);
5353
}
5454

55+
protected function shouldFailOnPhpErrors(): bool
56+
{
57+
// doctrine/orm/src/Query/Parser.php throws assert($this->lexer->lookahead !== null)
58+
return false;
59+
}
60+
5561
}

tests/Rules/Doctrine/ORM/QueryBuilderDqlRuleTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,10 @@ public static function getAdditionalConfigFiles(): array
171171
];
172172
}
173173

174+
protected function shouldFailOnPhpErrors(): bool
175+
{
176+
// doctrine/orm/src/Query/Parser.php throws assert(): assert($peek !== null) error
177+
return false;
178+
}
179+
174180
}

0 commit comments

Comments
 (0)