-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
[DoctrineBridge] Add new file extension for YAML mapping #28154
Comments
PR welcome. |
Maybe I'm wrong (it's happen often 😄) but the doc said that this use case is cover and the source code too |
@ismail1432 You're right for the docs, but not for the code (the one you linked is about validation, not schema mapping) :). I confirm that the symfony/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php Lines 243 to 244 in 373dad3
But especially because of https://github.com/doctrine/doctrine2/blob/4e715727da55b5d54389dfdc749586ccf3b939d4/lib/Doctrine/ORM/Mapping/Driver/SimplifiedYamlDriver.php#L33. So this requires a doctrine PR (as a bugfix on 2.x since everything about YAML has been removed from the master branch..). |
@chalasr You refer to the default file extension, but it can be overridden in SimplifiedYamlDriver constructor. We can add a new option to the bundle configurion. |
@ossinkine you're right, we should be able to fix this in the bridge only. |
Or maybe we shouldn't help people using YAML for Doctrine mappings since it will be removed in Doctrine 3 anyway so the best thing to do for new projects is not using YAML at all for doctrine mappings (but rather XML or annotations). |
@rpkamp I didn't know that YAML is deprecated, but it seems it's true: doctrine/orm#7374 |
Is anyone working on this PR? |
I am 👎 on investing any time here as support for the YAML format will be dropped in Doctrine 3. |
What if we copy Yaml loaders to the Doctrine Bridge? The Symfony community uses Yaml a lot, so why not supporting it on our side? |
I am against that too. In the documentation we recommend to use annotations for configuring the Doctrine mappings. So IMO it's not worth to take over maintenance of the YAML driver. If someone's really interested in still having it supported, they should (from my point of view) create a new dedicated package for that. |
I agree with you, @xabbuh. Then let's close this issue? |
Taking over the maintenance ourselves would be even worse, because it means that any mapping change in Doctrine would have to be ported to the external YAML driver. |
Description
At the moment, the Doctrine mapping with the
yml
type looks for files with the.orm.yml
extension.I suggest adding the
.orm.yaml
extension or adding the ability to specify an extension in config.The text was updated successfully, but these errors were encountered: