Skip to content

Commit 7d765e1

Browse files
committed
Fixed validate rules not set on prototyped config vars
1 parent cd2dd02 commit 7d765e1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/batch-symfony-framework/src/DependencyInjection/Configuration.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ private function launcher(): ArrayNodeDefinition
132132
->arrayNode('launchers')
133133
->defaultValue(['simple' => 'simple://simple'])
134134
->useAttributeAsKey('name')
135-
->scalarPrototype()->end()
136-
->validate()
137-
->ifTrue($isInvalidDsn)->thenInvalid('Invalid job launcher DSN.')
135+
->scalarPrototype()
136+
->validate()
137+
->ifTrue($isInvalidDsn)->thenInvalid('Invalid job launcher DSN.')
138+
->end()
138139
->end()
139140
->end()
140141
->arrayNode('messenger')
@@ -180,10 +181,11 @@ private function parameters(): ArrayNodeDefinition
180181
->end()
181182
->arrayNode('per_job')
182183
->useAttributeAsKey('name')
183-
->variablePrototype()->end()
184-
->validate()
185-
->ifTrue(fn(mixed $value) => !$isStringAssociativeArray($value))
186-
->thenInvalid('Should be an array<string, mixed>.')
184+
->variablePrototype()
185+
->validate()
186+
->ifTrue(fn(mixed $value) => !$isStringAssociativeArray($value))
187+
->thenInvalid('Should be an array<string, mixed>.')
188+
->end()
187189
->end()
188190
->end()
189191
->end()

0 commit comments

Comments
 (0)