Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[BridgeDoctrineMessenger] Doctrine ping connection middleware#31061
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[BridgeDoctrineMessenger] Doctrine ping connection middleware#31061
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
452dba4 to11c4a4bComparesrc/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
CS-related comments only :)
src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
58e0480 to5fa2957Compare
sroze left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It's a good idea. One simple comment.
Also, can you open a WIP pull-request on the DoctrineBundle as well so the servicemessenger.middleware.doctrine_ping_connection would be available by default? Maybe we should provide two services with the different values offorceCloseConnection?
| { | ||
| private $managerRegistry; | ||
| private $entityManagerName; | ||
| private $forceCloseConnection = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You don't need this default value as it's given by the constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
As you said, I think that creating 2 separated middlewares is better. Is it ok?
sroze commentedApr 22, 2019
As long as it’s clear in your documentation PR I think it’s okay 👍 |
sroze commentedApr 22, 2019
@insidestyles what I meant is only one class here but two service definitions withinthe DoctrineBundle where you need to register the services (in the |
insidestyles commentedApr 22, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I understood. Should I revert the last commit? I also createddoctrine/DoctrineBundle#956 |
alcaeus commentedApr 23, 2019
@sroze what Symfony version are you targeting with this? Is this still eligible for 4.3 or will this land in 4.4 by default? |
fabpot commentedApr 24, 2019
I will stop merging new features for 4.3 probably at the end of the week. But I would really like this one to be part of 4.3 :) We need some approvals. |
sroze left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you add a note in the CHANGELOG as well as the@experimental in 4.3 annotation on the two classes, please?
insidestyles commentedApr 28, 2019
@sroze Done. |
9dd9276 to6fd9f6aComparesroze commentedApr 28, 2019
Thank you@insidestyles. |
…dleware (insidestyles)This PR was squashed before being merged into the 4.3-dev branch (closes#31061).Discussion----------[BridgeDoctrineMessenger] Doctrine ping connection middleware| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->- Check and reconnect if mysql has gone away: <service public="false"> <argument type="service" /> </service>- Close and save opened connections (not active worker): <service public="false"> <argument type="service" /> </service>Commits-------6fd9f6a [BridgeDoctrineMessenger] Doctrine ping connection middleware
Uh oh!
There was an error while loading.Please reload this page.
Check and reconnect if mysql has gone away:
Close and save opened connections (not active worker):