Skip to content

Commit

Permalink
chore: doctrine deprecations (#6237)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Apr 12, 2024
1 parent c017be6 commit 84abbf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Test/DoctrineMongoDbOdmTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function createTestDocumentManager($paths = []): DocumentManager
$config->setHydratorDir(sys_get_temp_dir());
$config->setProxyNamespace('SymfonyTests\Doctrine');
$config->setHydratorNamespace('SymfonyTests\Doctrine');
$config->setMetadataDriverImpl(new AttributeDriver($paths, new AttributeReader()));
$config->setMetadataDriverImpl(new AttributeDriver($paths, class_exists(\Doctrine\Common\Annotations\Reader::class) ? new AttributeReader() : null)); // @phpstan-ignore-line type is only documented as phpdoc
$config->setMetadataCache(new ArrayAdapter());

return DocumentManager::create(null, $config);
Expand Down
1 change: 1 addition & 0 deletions tests/Fixtures/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class_exists(NativePasswordHasher::class) ? 'password_hashers' : 'encoders' => [
$c->prependExtensionConfig('doctrine', [
'orm' => [
'report_fields_where_declared' => true,
'controller_resolver' => ['auto_mapping' => true],
'enable_lazy_ghost_objects' => true,
],
]);
Expand Down

0 comments on commit 84abbf2

Please sign in to comment.