8000 [Messenger] Add a middleware that wraps all handlers in one Doctrine transaction. by Nyholm · Pull Request #26647 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Messenger] Add a middleware that wraps all handlers in one Doctrine transaction. #26647

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow null
  • Loading branch information
Nyholm committed Mar 27, 2018
commit 05ac7cfeff772bf452154152715ecea7eb2cb399
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ private function addMessengerSection(ArrayNodeDefinition $rootNode)
->arrayNode('doctrine_transaction')
->canBeEnabled()
->children()
->scalarNode('entity_manager_name')->info('The name of the entity manager to use')->defaultValue('default')->end()
->scalarNode('entity_manager_name')->info('The name of the entity manager to use')->defaultNull()->end()
->end()
->end()
->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WrapsMessageHandlingInTransaction implements MiddlewareInterface
private $managerRegistry;
private $entityManagerName;

public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName)
public function __construct(ManagerRegistry $managerRegistry, ?string $entityManagerName)
{
$this->managerRegistry = $managerRegistry;
$this->entityManagerName = $entityManagerName;
Expand Down
0