File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
src/Symfony/Bundle/FrameworkBundle Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1630,9 +1630,28 @@ function ($a) {
16301630 ->end ()
16311631 ->end ()
16321632 ->arrayNode ('stop_worker_on_signals ' )
1633+ ->fixXmlConfig ('stop_worker_on_signal ' )
16331634 ->defaultValue ([])
16341635 ->info ('A list of signals that should stop the worker; defaults to SIGTERM and SIGINT. ' )
1635- ->integerPrototype ()->end ()
1636+ ->beforeNormalization ()
1637+ ->always ()
1638+ ->then (function ($ v ) {
1639+ return array_map (static function ($ element ): int {
1640+ $ element = \is_array ($ element ) ? $ element ['signal ' ] : $ element ;
1641+
1642+ if (\is_string ($ element )) {
1643+ if (str_starts_with ($ element , 'SIG ' ) && \array_key_exists ($ element , get_defined_constants (true )['pcntl ' ])) {
1644+ $ element = \constant ($ element );
1645+ }
1646+
1647+ return $ element ;
1648+ }
1649+
1650+ return $ element ;
1651+ }, $ v );
1652+ })
1653+ ->end ()
1654+ ->scalarPrototype ()->end ()
16361655 ->end ()
16371656 ->scalarNode ('default_bus ' )->defaultNull ()->end ()
16381657 ->arrayNode ('buses ' )
Original file line number Diff line number Diff line change 581581 <xsd : element name =" routing" type =" messenger_routing" minOccurs =" 0" maxOccurs =" unbounded" />
582582 <xsd : element name =" transport" type =" messenger_transport" minOccurs =" 0" maxOccurs =" unbounded" />
583583 <xsd : element name =" bus" type =" messenger_bus" minOccurs =" 0" maxOccurs =" unbounded" />
584+ <xsd : element name =" stop-worker-on-signal" type =" xsd:string" minOccurs =" 0" maxOccurs =" unbounded" />
584585 </xsd : sequence >
585586 <xsd : attribute name =" default-bus" type =" xsd:string" />
586587 <xsd : attribute name =" enabled" type =" xsd:boolean" />
You can’t perform that action at this time.
0 commit comments