Skip to content

Commit befcabc

Browse files
committed
Adding a hack to work around a remaining direct deprecation in PHP < 7.3
1 parent 845fdf0 commit befcabc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Doctrine/EntityRegeneratorTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ class EntityRegeneratorTest extends TestCase
3838
*/
3939
public function testRegenerateEntities(string $expectedDirName, bool $overwrite)
4040
{
41+
/*
42+
* Prior to symfony/doctrine-bridge 5.0 (which require
43+
* PHP 7.3), the deprecated Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain
44+
* is used when our test container. This shows up as a *direct*
45+
* deprecation. We're choosing to silence it here, instead of
46+
* ignoring all direct deprecations.
47+
*/
48+
if (\PHP_VERSION_ID < 70300) {
49+
$this->setGroups(['@legacy']);
50+
}
51+
4152
$kernel = new TestEntityRegeneratorKernel('dev', true);
4253
$this->doTestRegeneration(
4354
__DIR__.'/fixtures/source_project',

0 commit comments

Comments
 (0)