Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PayumBundle not respects default entity manager #463

Open
poolerMF opened this issue Mar 23, 2018 · 3 comments · May be fixed by #502
Open

PayumBundle not respects default entity manager #463

poolerMF opened this issue Mar 23, 2018 · 3 comments · May be fixed by #502

Comments

@poolerMF
Copy link

when I define doctrine like this:

doctrine:
	orm:
		auto_generate_proxy_classes: '%kernel.debug%'
		default_entity_manager: central
		entity_managers:
			central:
				naming_strategy: doctrine.orm.naming_strategy.underscore
				auto_mapping: true
				metadata_cache_driver: apc

function PayumExtension->prepend

  • prepends config to "orm"
  • doctrine will create another manager "doctrine.orm.default_entity_manager"
  • that manager is used for payum
  • that manager will not contain anything I define in yml config (for example metadata_cache_driver I changed to apc)
  • payum EM will have default value FOR EVERYTHING (metadata_cache_driver will be array)
@makasim
Copy link
Member

makasim commented Mar 26, 2018

A PR would be great.

@makasim
Copy link
Member

makasim commented Mar 26, 2018

This where it should be fixed

if (isset($bundles['DoctrineBundle'])) {

@poolerMF
Copy link
Author

sorry, I will not fix it, I'm just writing you that, there is error ...
if you want real example, try example above

and another "bug" is that, getExtensionConfig is returning array of configs .. not only one last config

maybe you need to find/detect "default_manager" and add mappings there

@piotrantosik piotrantosik linked a pull request Jan 21, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants