-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Determine attribute or annotation type for directories #43754
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
Conversation
Can you add a test please? |
@derrabus I would love to. However, the original functionality doesn't have a test to begin with. Also, this test would necessarily need to refer to external files and I don't have any idea how to do that in your test suite. Can you give me a pointer how you would go about this? |
src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php
Outdated
Show resolved
Hide resolved
Writing tests could be done by adding a directory with fixtures in a test folder. |
Thanks for the suggestion, have made a new folder with an attribute annotation entity and added a test to detect the different kind of types. |
Thank you @cinamo. |
When loading a bundle with a Doctrine entity, this entity is automatically recognized if auto_mapping: true is set in the Doctrine DBAL configuration. This currently only works if your entity class uses annotations, not attributes; this pull request adds that possibility.