Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 55a3ffc

Browse filesBrowse files
committed
Remove the Doctrine middleware configuration from the FrameworkBundle
1 parent 2e47edc commit 55a3ffc
Copy full SHA for 55a3ffc

File tree

9 files changed

+0
-87
lines changed
Filter options

9 files changed

+0
-87
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -998,16 +998,6 @@ function ($a) {
998998
->end()
999999
->end()
10001000
->end()
1001-
->arrayNode('middlewares')
1002-
->addDefaultsIfNotSet()
1003-
->children()
1004-
->arrayNode('doctrine_transaction')
1005-
->canBeEnabled()
1006-
->children()
1007-
->scalarNode('entity_manager_name')->info('The name of the entity manager to use')->defaultNull()->end()
1008-
->end()
1009-
->end()
1010-
->end()
10111001
->end()
10121002
->end()
10131003
->end()

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
-9Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,15 +1446,6 @@ private function registerMessengerConfiguration(array $config, ContainerBuilder
14461446

14471447
$container->getDefinition('messenger.sender_locator')->replaceArgument(0, $senderLocatorMapping);
14481448
$container->getDefinition('messenger.asynchronous.routing.sender_locator')->replaceArgument(1, $messageToSenderIdsMapping);
1449-
1450-
if ($config['middlewares']['doctrine_transaction']['enabled']) {
1451-
if (!class_exists(DoctrineTransactionMiddleware::class)) {
1452-
throw new LogicException('The Doctrine transaction middleware is only available when the doctrine bridge is installed. Try running "composer require symfony/doctrine-bridge".');
1453-
}
1454-
$container->getDefinition('messenger.middleware.doctrine_transaction')->replaceArgument(1, $config['middlewares']['doctrine_transaction']['entity_manager_name']);
1455-
} else {
1456-
$container->removeDefinition('messenger.middleware.doctrine_transaction');
1457-
}
14581449
}
14591450

14601451
private function registerCacheConfiguration(array $config, ContainerBuilder $container)

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@
2525
<tag name="message_bus_middleware" priority="-10" />
2626
</service>
2727

28-
<service id="messenger.middleware.doctrine_transaction" class="Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddleware">
29-
<argument type="service" id="doctrine" />
30-
<argument /> <!-- Entity manager name -->
31-
32-
<tag name="message_bus_middleware" priority="9" />
33-
</service>
34-
3528
<!-- Asynchronous -->
3629
<service id="messenger.asynchronous.routing.sender_locator" class="Symfony\Component\Messenger\Asynchronous\Routing\SenderLocator">
3730
<argument type="service" id="messenger.sender_locator" />

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@
347347
<xsd:complexType name="messenger">
348348
<xsd:sequence>
349349
<xsd:element name="routing" type="messenger_routing" minOccurs="0" maxOccurs="unbounded" />
350-
<xsd:element name="middlewares" type="messenger_middleware" minOccurs="0" maxOccurs="unbounded" />
351350
</xsd:sequence>
352351
</xsd:complexType>
353352

@@ -361,15 +360,4 @@
361360
<xsd:complexType name="messenger_routing_sender">
362361
<xsd:attribute name="service" type="xsd:string" use="required"/>
363362
</xsd:complexType>
364-
365-
<xsd:complexType name="messenger_middleware">
366-
<xsd:sequence>
367-
<xsd:element name="doctrine-transaction" type="messenger_doctrine_transaction" minOccurs="0" maxOccurs="1" />
368-
</xsd:sequence>
369-
</xsd:complexType>
370-
371-
<xsd:complexType name="messenger_doctrine_transaction">
372-
<xsd:attribute name="entity-manager-name" type="xsd:string" />
373-
<xsd:attribute name="enabled" type="xsd:boolean" />
374-
</xsd:complexType>
375363
</xsd:schema>

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,6 @@ class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported() ? 'semaphor
253253
'messenger' => array(
254254
'enabled' => !class_exists(FullStack::class) && class_exists(MessageBusInterface::class),
255255
'routing' => array(),
256-
'middlewares' => array(
257-
'doctrine_transaction' => array(
258-
'enabled' => false,
259-
'entity_manager_name' => null,
260-
),
261-
),
262256
),
263257
);
264258
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_doctrine.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_doctrine.php
-11Lines changed: 0 additions & 11 deletions
This file was deleted.

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_doctrine.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/messenger_doctrine.xml
-15Lines changed: 0 additions & 15 deletions
This file was deleted.

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_doctrine.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/messenger_doctrine.yml
-5Lines changed: 0 additions & 5 deletions
This file was deleted.

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -496,18 +496,6 @@ public function testMessenger()
496496
$this->assertFalse($container->hasDefinition('messenger.middleware.doctrine_transaction'));
497497
}
498498

499-
public function testMessengerDoctrine()
500-
{
501-
if (!class_exists(ContainerAwareEventManager::class)) {
502-
self::markTestSkipped('Skipping tests since Doctrine bridge is not installed');
503-
}
504-
505-
$container = $this->createContainerFromFile('messenger_doctrine');
506-
$this->assertTrue($container->hasDefinition('messenger.middleware.doctrine_transaction'));
507-
$def = $container->getDefinition('messenger.middleware.doctrine_transaction');
508-
$this->assertEquals('foobar', $def->getArgument(1));
509-
}
510-
511499
public function testTranslator()
512500
{
513501
$container = $this->createContainerFromFile('full');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.