Configuring Doctrine ORM Mapping and DBAL Connection for custom Bundle #61309
-
Hey! I'm creating a Bundle that implements some common code related to auth and permissions. This Bundle will be used in company projects that all require the same auth method and shared data source with users, groups and their permissions and settings. For this Bundle to work I need to inject ORM mapping and DBAL connection to parent project configuration. How and where should I inject bundle-related doctrine config to project config? After preparing PS. I really want to avoid adding the exact same configuration to every existing project - too much work if I had to change anything in this config or maybe add more mappings or connections. Symfony: 7.3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, looks like you need something like |
Beta Was this translation helpful? Give feedback.
Hello,
looks like you need something like
prependExtensionConfig
; see https://symfony.com/doc/current/bundles/prepend_extension.html#prepending-extension-in-the-bundle-class