Skip to content

Commit bda3c65

Browse files
committed
Merge branch '4.1'
* 4.1: [Messenger] Middleware factories support in config [HttpKernel] Make TraceableValueResolver $stopwatch mandatory [Messenger] Improve the profiler panel [Workflow] Added DefinitionBuilder::setMetadataStore(). [Messenger][DX] Uses custom method names for handlers [Messenger] remove autoconfiguration for Sender/ReceiverInterface [Messenger] Make sure default receiver name is set before command configuration [HttpKernel] Fix services are no longer injected into __invoke controllers method Rename tag attribute "name" by "alias" Autoconfiguring TransportFactoryInterface classes [Messenger] Fix new AMQP Transport test with Envelope Fixed return senders based on the message parents/interfaces [Messenger] Make sure Sender and Receiver locators have valid services [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead [Messenger] Fix TraceableBus with envelope Ensure the envelope is passed back and can be altered Ensure that the middlewares can also update the message within the envelope feature #26945 [Messenger] Support configuring messages when dispatching (ogizanagi) Add more tests around the AMQP transport
2 parents afaf6c1 + b0299e1 commit bda3c65

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bridge\Doctrine\Messenger;
13+
14+
use Symfony\Bridge\Doctrine\ManagerRegistry;
15+
16+
/**
17+
* Create a Doctrine ORM transaction middleware to be used in a message bus from an entity manager name.
18+
*
19+
* @author Maxime Steinhausser <[email protected]>
20+
*
21+
* @experimental in 4.1
22+
* @final
23+
*/
24+
class DoctrineTransactionMiddlewareFactory
25+
{
26+
private $managerRegistry;
27+
28+
public function __construct(ManagerRegistry $managerRegistry)
29+
{
30+
$this->managerRegistry = $managerRegistry;
31+
}
32+
33+
public function createMiddleware(string $managerName): DoctrineTransactionMiddleware
34+
{
35+
return new DoctrineTransactionMiddleware($this->managerRegistry, $managerName);
36+
}
37+
}

0 commit comments

Comments
 (0)