File tree 2 files changed +21
-1
lines changed
src/Symfony/Bundle/FrameworkBundle
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1531,7 +1531,22 @@ function ($a) {
1531
1531
->arrayNode ('stop_worker_on_signals ' )
1532
1532
->defaultValue ([])
1533
1533
->info ('A list of signals that should stop the worker; defaults to SIGTERM and SIGINT. ' )
1534
- ->integerPrototype ()->end ()
1534
+ ->beforeNormalization ()
1535
+ ->always ()
1536
+ ->then (function ($ v ) {
1537
+ return array_map (static function ($ element ): int {
1538
+ $ element = \is_array ($ element ) ? $ element ['signal ' ] : $ element ;
1539
+ if (\is_string ($ element )) {
1540
+ $ signal = \constant ('\\' .$ element );
1541
+
1542
+ return null !== $ signal ? $ signal : (int ) $ element ;
1543
+ }
1544
+
1545
+ return $ element ;
1546
+ }, $ v );
1547
+ })
1548
+ ->end ()
1549
+ ->variablePrototype ()->end ()
1535
1550
->end ()
1536
1551
->scalarNode ('default_bus ' )->defaultNull ()->end ()
1537
1552
->arrayNode ('buses ' )
Original file line number Diff line number Diff line change 543
543
<xsd : element name =" routing" type =" messenger_routing" minOccurs =" 0" maxOccurs =" unbounded" />
544
544
<xsd : element name =" transport" type =" messenger_transport" minOccurs =" 0" maxOccurs =" unbounded" />
545
545
<xsd : element name =" bus" type =" messenger_bus" minOccurs =" 0" maxOccurs =" unbounded" />
546
+ <xsd : element name =" stop-worker-on-signals" type =" messenger_stop_worker_on_signals" minOccurs =" 0" maxOccurs =" unbounded" />
546
547
</xsd : sequence >
547
548
<xsd : attribute name =" default-bus" type =" xsd:string" />
548
549
<xsd : attribute name =" enabled" type =" xsd:boolean" />
611
612
<xsd : attribute name =" id" type =" xsd:string" use =" required" />
612
613
</xsd : complexType >
613
614
615
+ <xsd : complexType name =" messenger_stop_worker_on_signals" >
616
+ <xsd : attribute name =" signal" type =" xsd:string" use =" required" />
617
+ </xsd : complexType >
618
+
614
619
<xsd : complexType name =" http_client" >
615
620
<xsd : sequence >
616
621
<xsd : element name =" default-options" type =" http_client_default_options" minOccurs =" 0" />
You can’t perform that action at this time.
0 commit comments