Skip to content

Commit

Permalink
Add recipe for DoctrineBundle 1.12 and newer
Browse files Browse the repository at this point in the history
* Replaces deprecated underscore naming strategy with non-deprecated number-aware strategy
* Remove special production config
  • Loading branch information
alcaeus committed Nov 19, 2019
1 parent f5f76c3 commit bf7c5fd
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
24 changes: 24 additions & 0 deletions doctrine/doctrine-bundle/1.12/config/packages/doctrine.yaml
@@ -0,0 +1,24 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'

# IMPORTANT: You MUST configure your db driver and server version,
# either here or in the DATABASE_URL env var (see .env file)
#driver: 'mysql'
#server_version: '5.7'

# Only needed for MySQL (ignored otherwise)
charset: utf8mb4
default_table_options:
collate: utf8mb4_unicode_ci
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
@@ -0,0 +1,3 @@
doctrine:
orm:
auto_generate_proxy_classes: false
1 change: 1 addition & 0 deletions doctrine/doctrine-bundle/1.12/manifest.json
1 change: 1 addition & 0 deletions doctrine/doctrine-bundle/1.12/post-install.txt
1 change: 1 addition & 0 deletions doctrine/doctrine-bundle/1.12/src

0 comments on commit bf7c5fd

Please sign in to comment.