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

Deprecation in UnderscoreNamingStrategy #1057

Closed
garak opened this issue Nov 19, 2019 · 2 comments · Fixed by #1059
Closed

Deprecation in UnderscoreNamingStrategy #1057

garak opened this issue Nov 19, 2019 · 2 comments · Fixed by #1059
Projects
Milestone

Comments

@garak
Copy link
Contributor

garak commented Nov 19, 2019

I use naming_strategy: doctrine.orm.naming_strategy.underscore in my Symfony project config.
I'm getting the following deprecation:

Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.

I tried to look into code to see if I can avoid it using some config, but it couldn't find anything

Required versions:
"doctrine/doctrine-bundle": "^2.0@beta",
"doctrine/orm": "^2.7",

@alcaeus
Copy link
Member

alcaeus commented Nov 19, 2019

See #1059: in the meantime you can define your own service and use that in your config. This will be available in 1.12.x. We'll be keeping the underscore strategy around in 2.0 as well until the bundle supports ORM 3.0.

@alcaeus alcaeus added this to the 1.12.0-Beta2 milestone Nov 19, 2019
@alcaeus alcaeus added this to 1.12 (bug fixes only) in Roadmap Nov 27, 2019
@crassaert
Copy link

You can replace this with
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
1.12 (bug fixes only)
Development

Successfully merging a pull request may close this issue.

3 participants