Skip to content

Commit c18aa8a

Browse files
authored
Fix doctrine cache on production 2.1 (#1153)
`Doctrine\Common\Cache\Psr6\DoctrineProvider` is not available any more in latest doctrine Fixes: #1151
2 parents f7268c8 + ab15b2d commit c18aa8a

File tree

1 file changed

+18
-35
lines changed

1 file changed

+18
-35
lines changed

config/packages/doctrine.yaml

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,28 @@ doctrine:
99
dbal:
1010
url: '%env(resolve:DATABASE_URL)%'
1111
orm:
12-
auto_generate_proxy_classes: '%kernel.debug%'
13-
entity_managers:
14-
default:
15-
auto_mapping: true
16-
mappings:
17-
App:
18-
is_bundle: false
19-
type: attribute
20-
dir: '%kernel.project_dir%/src/Entity'
21-
prefix: 'App\Entity'
22-
alias: App
12+
auto_generate_proxy_classes: true
13+
auto_mapping: true
14+
mappings:
15+
App:
16+
is_bundle: false
17+
type: attribute
18+
dir: '%kernel.project_dir%/src/Entity'
19+
prefix: 'App\Entity'
20+
alias: App
2321

2422
when@prod: &doctrine_prod
2523
doctrine:
2624
orm:
27-
entity_managers:
28-
default:
29-
metadata_cache_driver:
30-
type: service
31-
id: doctrine.system_cache_provider
32-
query_cache_driver:
33-
type: service
34-
id: doctrine.system_cache_provider
35-
result_cache_driver:
36-
type: service
37-
id: doctrine.result_cache_provider
38-
services:
39-
doctrine.result_cache_provider:
40-
class: Doctrine\Common\Cache\Psr6\DoctrineProvider
41-
public: false
42-
factory: [ 'Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap' ]
43-
arguments:
44-
- '@doctrine.result_cache_pool'
45-
doctrine.system_cache_provider:
46-
class: Doctrine\Common\Cache\Psr6\DoctrineProvider
47-
public: false
48-
factory: [ 'Doctrine\Common\Cache\Psr6\DoctrineProvider', 'wrap' ]
49-
arguments:
50-
- '@doctrine.system_cache_pool'
25+
auto_generate_proxy_classes: false
26+
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
27+
query_cache_driver:
28+
type: pool
29+
pool: doctrine.system_cache_pool
30+
result_cache_driver:
31+
type: pool
32+
pool: doctrine.result_cache_pool
33+
5134
framework:
5235
cache:
5336
pools:

0 commit comments

Comments
 (0)