File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 5757use Symfony \Component \HttpClient \ScopingHttpClient ;
5858use Symfony \Component \HttpKernel \DependencyInjection \LoggerPass ;
5959use Symfony \Component \HttpKernel \Fragment \FragmentUriGeneratorInterface ;
60+ use Symfony \Component \Lock \Store \SemaphoreStore ;
6061use Symfony \Component \Messenger \Bridge \AmazonSqs \Transport \AmazonSqsTransportFactory ;
6162use Symfony \Component \Messenger \Bridge \Amqp \Transport \AmqpTransportFactory ;
6263use 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 ()
You can’t perform that action at this time.
0 commit comments