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

Platform-related events don't work if you specify a custom platform #3649

Closed
zerocrates opened this issue Aug 9, 2019 · 2 comments · Fixed by #5320
Closed

Platform-related events don't work if you specify a custom platform #3649

zerocrates opened this issue Aug 9, 2019 · 2 comments · Fixed by #5320

Comments

@zerocrates
Copy link

zerocrates commented Aug 9, 2019

Bug Report

Q A
BC Break no
Version 2.9/master

The event manager is only injected into the platform in the detectDatabasePlatform method of Doctrine\DBAL\Connection. If you specify a platform, then the detection method is never called and the event manager is not injected.

You can, after creating the Connection, get its event manager and set it on the platform yourself... I don't know if there are any events that might fire in the meantime that could be missed if done this way, but it seems not since detectDatabasePlatform is already only called "just-in-time."

If that's in fact sufficient it would still probably be an issue with the documentation which indicates merely creating and passing the platform should be sufficient.

@SenseException
Copy link
Member

If your documentation proposal is about extending the docs for the event manager, we would appreciate a PR.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants