Skip to content

Commit

Permalink
test: fix report_fields_where_declared deprecation (api-platform#5710)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored and Romaixn committed Oct 3, 2023
1 parent 446cd70 commit 15e66f6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/Fixtures/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use ApiPlatform\Tests\Fixtures\TestBundle\Document\User as UserDocument;
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\User;
use ApiPlatform\Tests\Fixtures\TestBundle\TestBundle;
use Doctrine\Bundle\DoctrineBundle\ConnectionFactory;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Doctrine\Bundle\MongoDBBundle\Command\TailCursorDoctrineODMCommand;
use Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle;
Expand Down Expand Up @@ -217,6 +218,15 @@ class_exists(NativePasswordHasher::class) ? 'password_hashers' : 'encoders' => [
],
]);

// TODO: remove this check and move this config in config_common.yml when dropping support for DoctrineBundle <2.10
if (defined(ConnectionFactory::class.'::DEFAULT_SCHEME_MAP')) {
$c->prependExtensionConfig('doctrine', [
'orm' => [
'report_fields_where_declared' => true,
],
]);
}

$loader->load(__DIR__.'/config/config_swagger.php');

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

0 comments on commit 15e66f6

Please sign in to comment.