Skip to content

Commit 6f6ffe2

Browse files
authored
Put doctrine proxies in build dir for production
When auto_generate_proxy_classes: false is set, the proxies need to be pre-generated with the cache warmer. So in this case, the files are much better suited in the build dir. The build dir is the same as the cache dir by default. But for people trying to use the build dir properly, this makes much more sense. See symfony/symfony#40827 (comment)
1 parent 833082a commit 6f6ffe2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doctrine/doctrine-bundle/2.4/config/packages/doctrine.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ when@prod:
2626
doctrine:
2727
orm:
2828
auto_generate_proxy_classes: false
29+
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
2930
query_cache_driver:
3031
type: pool
3132
pool: doctrine.system_cache_pool

0 commit comments

Comments
 (0)