Skip to content

Commit

Permalink
[BridgeDoctrineMessenger] Doctrine close connection middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
insidestyles committed Apr 28, 2019
1 parent ddd7587 commit 25612a8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ CHANGELOG
* changed guessing of DECIMAL to set the `input` option of `NumberType` to string
* deprecated not passing an `IdReader` to the `DoctrineChoiceLoader` when query can be optimized with a single id field
* deprecated passing an `IdReader` to the `DoctrineChoiceLoader` when entities have a composite id
* added `DoctrinePingConnectionMiddleware`
* added `DoctrineCloseConnectionMiddleware`

4.2.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;

/**
* Closes connection and therefore saves number of connections
*
* @author Fuong <insidestyles@gmail.com>
*
* @experimental in 4.3
*/
class DoctrineCloseConnectionMiddleware implements MiddlewareInterface
{
private $managerRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;

/**
* Checks whether the connection is still open or reconnects otherwise.
*
* @author Fuong <insidestyles@gmail.com>
*
* @experimental in 4.3
*/
class DoctrinePingConnectionMiddleware implements MiddlewareInterface
{
private $managerRegistry;
Expand Down

0 comments on commit 25612a8

Please sign in to comment.