Skip to content

Commit f5aef10

Browse files
authored
test: fix report_fields_where_declared deprecation (#5710)
1 parent 146991b commit f5aef10

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Fixtures/app/AppKernel.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use ApiPlatform\Tests\Fixtures\TestBundle\Document\User as UserDocument;
1717
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\User;
1818
use ApiPlatform\Tests\Fixtures\TestBundle\TestBundle;
19+
use Doctrine\Bundle\DoctrineBundle\ConnectionFactory;
1920
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
2021
use Doctrine\Bundle\MongoDBBundle\Command\TailCursorDoctrineODMCommand;
2122
use Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle;
@@ -217,6 +218,15 @@ class_exists(NativePasswordHasher::class) ? 'password_hashers' : 'encoders' => [
217218
],
218219
]);
219220

221+
// TODO: remove this check and move this config in config_common.yml when dropping support for DoctrineBundle <2.10
222+
if (defined(ConnectionFactory::class.'::DEFAULT_SCHEME_MAP')) {
223+
$c->prependExtensionConfig('doctrine', [
224+
'orm' => [
225+
'report_fields_where_declared' => true,
226+
],
227+
]);
228+
}
229+
220230
$loader->load(__DIR__.'/config/config_swagger.php');
221231

222232
if ('mongodb' === $this->environment) {

0 commit comments

Comments
 (0)