Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e35d6e3

Browse files
authored
Setup de doctrine/orm (afup#1987)
1 parent b0da3ea commit e35d6e3

24 files changed

Lines changed: 1565 additions & 337 deletions

app/config/bundles.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
1919
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
2020
CuyZ\ValinorBundle\ValinorBundle::class => ['all' => true],
21+
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
2122
];

app/config/packages/doctrine.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
doctrine:
2+
dbal:
3+
dbname: '%env(DATABASE_NAME)%'
4+
host: '%env(DATABASE_HOST)%'
5+
port: '%env(DATABASE_PORT)%'
6+
user: '%env(DATABASE_USER)%'
7+
password: '%env(DATABASE_PASSWORD)%'
8+
server_version: '5.7'
9+
10+
profiling_collect_backtrace: '%kernel.debug%'
11+
use_savepoints: true
12+
orm:
13+
auto_generate_proxy_classes: true
14+
enable_lazy_ghost_objects: true
15+
report_fields_where_declared: true
16+
validate_xml_mapping: true
17+
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
18+
auto_mapping: true
19+
controller_resolver:
20+
auto_mapping: false
21+
mappings:
22+
Accounting:
23+
type: attribute
24+
is_bundle: false
25+
dir: '%kernel.project_dir%/../sources/AppBundle/Accounting/Entity'
26+
prefix: 'AppBundle\Accounting\Entity'
27+
alias: Accounting
28+
29+
when@test:
30+
doctrine:
31+
dbal:
32+
dbname: 'web'
33+
host: 'dbtest'
34+
port: '3306'
35+
user: 'root'
36+
password: 'root'
37+
server_version: '5.7'
38+
39+
when@prod:
40+
doctrine:
41+
orm:
42+
auto_generate_proxy_classes: false
43+
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
44+
query_cache_driver:
45+
type: pool
46+
pool: doctrine.system_cache_pool
47+
result_cache_driver:
48+
type: pool
49+
pool: doctrine.result_cache_pool
50+
51+
framework:
52+
cache:
53+
pools:
54+
doctrine.result_cache_pool:
55+
adapter: cache.app
56+
doctrine.system_cache_pool:
57+
adapter: cache.system

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"cuyz/valinor-bundle": "^2.0",
2121
"cweagans/composer-patches": "^1.7",
2222
"doctrine/dbal": "4.*",
23+
"doctrine/doctrine-bundle": "^2.18",
24+
"doctrine/orm": "^3.6",
2325
"drewm/mailchimp-api": "^2.5",
2426
"ekino/newrelic-bundle": "dev-patch-1#2cd9951c163bda2d18a1515b43ee574e51aac871",
2527
"erusev/parsedown": "^1.6",
@@ -143,6 +145,7 @@
143145
"phpstan/extension-installer": "^1.4",
144146
"phpstan/phpstan": "^2.1",
145147
"phpstan/phpstan-beberlei-assert": "^2.0",
148+
"phpstan/phpstan-doctrine": "^2.0",
146149
"phpstan/phpstan-symfony": "^2.0",
147150
"phpstan/phpstan-webmozart-assert": "^2.0",
148151
"phpunit/phpunit": "11.*",

0 commit comments

Comments
 (0)