Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 16, 2025

Ensure compatibility with doctrine/mongodb-odm#2933 when the new attribute classes are used.

@GromNaN GromNaN added this to the 5.6.0 milestone Dec 16, 2025
@GromNaN GromNaN requested review from Copilot and jmikola December 16, 2025 17:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the bundle to support the new Attribute classes introduced in doctrine/mongodb-odm 2.16 while maintaining backward compatibility with the existing Annotations classes. The changes ensure that document classes marked with either the old annotation-based or new attribute-based mapping are properly excluded from the Symfony container.

Key Changes:

  • Added support for the new Attribute namespace classes alongside deprecated Annotations classes
  • Refactored autoconfiguration registration to use a loop with conditional class existence checks
  • Updated tests to verify both annotation and attribute variants are excluded from the container

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/DependencyInjection/DoctrineMongoDBExtension.php Refactored autoconfiguration to support both Annotations and Attribute classes with conditional registration
tests/DependencyInjection/DoctrineMongoDBExtensionTest.php Extended test coverage to include new Attribute classes and added conditional test skipping for non-existent classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GromNaN GromNaN force-pushed the attribute-annotations branch from 8f5c6b2 to 1d1c5ad Compare December 18, 2025 15:50
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.

1 participant