Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
derrabus commentedOct 26, 2021
Can you add a test please? |
cinamo commentedOct 26, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@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 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedOct 28, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Writing tests could be done by adding a directory with fixtures in a test folder. |
cinamo commentedOct 31, 2021
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. |
nicolas-grekas commentedNov 2, 2021
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.