Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tests with Symfony 7 due to Annotation support removal #1711

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

dmaicher
Copy link
Contributor

No description provided.

@dmaicher dmaicher added this to the 2.11.0 milestone Oct 22, 2023
@@ -489,7 +491,7 @@ public function testSingleEntityManagerMultipleMappingBundleDefinitions(): void
$definition = $container->getDefinition('doctrine.orm.default_metadata_driver');

$this->assertDICDefinitionMethodCallAt(0, $definition, 'addDriver', [
new Reference('doctrine.orm.default_annotation_metadata_driver'),
new Reference(class_exists(AnnotationLoader::class) ? 'doctrine.orm.default_annotation_metadata_driver' : 'doctrine.orm.default_attribute_metadata_driver'),
Copy link
Contributor Author

@dmaicher dmaicher Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not so happy with this detection for Symfony 7 and removed annotations support.

Anyone got a better idea?

I tried $container->has('annotations.reader') but it fails since we are not loading the FrameworkExtension in tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside a DI extension, the ContainerBuilder won't have any of the services defined by other extensions anyway.

@dmaicher dmaicher marked this pull request as ready for review October 22, 2023 09:56
@dmaicher dmaicher merged commit 4efd966 into doctrine:2.11.x Oct 23, 2023
13 checks passed
@dmaicher dmaicher deleted the fix_symfony_7 branch October 23, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants