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 5432bc4

Browse filesBrowse files
committed
Merge branch '5.4' into 6.4
* 5.4: fix XSD to allow to configure locks without resources
2 parents 40aa18d + d022058 commit 5432bc4
Copy full SHA for 5432bc4

File tree

Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed

‎Resources/config/schema/symfony-1.0.xsd

Copy file name to clipboardExpand all lines: Resources/config/schema/symfony-1.0.xsd
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@
551551

552552
<xsd:complexType name="lock">
553553
<xsd:sequence>
554-
<xsd:element name="resource" type="lock_resource" minOccurs="1" maxOccurs="unbounded" />
554+
<xsd:element name="resource" type="lock_resource" minOccurs="0" maxOccurs="unbounded" />
555555
</xsd:sequence>
556556
<xsd:attribute name="enabled" type="xsd:boolean" />
557557
</xsd:complexType>

‎Tests/DependencyInjection/FrameworkExtensionTestCase.php

Copy file name to clipboardExpand all lines: Tests/DependencyInjection/FrameworkExtensionTestCase.php
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
use Symfony\Component\HttpClient\ScopingHttpClient;
5858
use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass;
5959
use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface;
60+
use Symfony\Component\Lock\Store\SemaphoreStore;
6061
use Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\AmazonSqsTransportFactory;
6162
use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpTransportFactory;
6263
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory;
@@ -2402,7 +2403,12 @@ public function testDefaultLock()
24022403

24032404
self::assertTrue($container->hasDefinition('lock.default.factory'));
24042405
$storeDef = $container->getDefinition($container->getDefinition('lock.default.factory')->getArgument(0));
2405-
self::assertEquals(new Reference('semaphore'), $storeDef->getArgument(0));
2406+
2407+
if (class_exists(SemaphoreStore::class) && SemaphoreStore::isSupported()) {
2408+
self::assertEquals(new Reference('semaphore'), $storeDef->getArgument(0));
2409+
} else {
2410+
self::assertEquals(new Reference('flock'), $storeDef->getArgument(0));
2411+
}
24062412
}
24072413

24082414
public function testNamedLocks()

0 commit comments

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