Doctrinebundle: Deprecation in UnderscoreNamingStrategy

Created on 19 Nov 2019  路  2Comments  路  Source: doctrine/DoctrineBundle

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",

Improvement

Most helpful comment

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

All 2 comments

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spdionis picture spdionis  路  5Comments

onavascuez picture onavascuez  路  4Comments

soullivaneuh picture soullivaneuh  路  3Comments

Sjeijoet picture Sjeijoet  路  4Comments

peter-gribanov picture peter-gribanov  路  7Comments