Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode): void
->end()
->end()
->arrayNode('supports')
->beforeNormalization()
->ifString()
->then(fn ($v) => [$v])
->end()
->beforeNormalization()->castToArray()->end()
->prototype('scalar')
->cannotBeEmpty()
->validate()
Expand Down Expand Up @@ -535,20 +532,14 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode): void
->example('is_fully_authenticated() and is_granted(\'ROLE_JOURNALIST\') and subject.getTitle() == \'My first article\'')
->end()
->arrayNode('from')
->beforeNormalization()
->ifString()
->then(fn ($v) => [$v])
->end()
->beforeNormalization()->castToArray()->end()
->requiresAtLeastOneElement()
->prototype('scalar')
->cannotBeEmpty()
->end()
->end()
->arrayNode('to')
->beforeNormalization()
->ifString()
->then(fn ($v) => [$v])
->end()
->beforeNormalization()->castToArray()->end()
->requiresAtLeastOneElement()
->prototype('scalar')
->cannotBeEmpty()
Expand Down Expand Up @@ -933,7 +924,7 @@ private function addTranslatorSection(ArrayNodeDefinition $rootNode, callable $e
->children()
->arrayNode('fallbacks')
->info('Defaults to the value of "default_locale".')
->beforeNormalization()->ifString()->then(fn ($v) => [$v])->end()
->beforeNormalization()->castToArray()->end()
->prototype('scalar')->end()
->defaultValue([])
->end()
Expand Down Expand Up @@ -1436,7 +1427,7 @@ private function addLockSection(ArrayNodeDefinition $rootNode, callable $enableI
->end()
->prototype('array')
->performNoDeepMerging()
->beforeNormalization()->ifString()->then(fn ($v) => [$v])->end()
->beforeNormalization()->castToArray()->end()
->prototype('scalar')->end()
->end()
->end()
Expand Down Expand Up @@ -2226,7 +2217,7 @@ private function addNotifierSection(ArrayNodeDefinition $rootNode, callable $ena
->arrayNode('channel_policy')
->useAttributeAsKey('name')
->prototype('array')
->beforeNormalization()->ifString()->then(fn ($v) => [$v])->end()
->beforeNormalization()->castToArray()->end()
->prototype('scalar')->end()
->end()
->end()
Expand Down Expand Up @@ -2442,18 +2433,12 @@ private function addHtmlSanitizerSection(ArrayNodeDefinition $rootNode, callable
->end()
->arrayNode('block_elements')
->info('Configures elements as blocked. Blocked elements are elements the sanitizer should remove from the input, but retain their children.')
->beforeNormalization()
->ifString()
->then(fn (string $n): array => (array) $n)
->end()
->beforeNormalization()->castToArray()->end()
->scalarPrototype()->end()
->end()
->arrayNode('drop_elements')
->info('Configures elements as dropped. Dropped elements are elements the sanitizer should remove from the input, including their children.')
->beforeNormalization()
->ifString()
->then(fn (string $n): array => (array) $n)
->end()
->beforeNormalization()->castToArray()->end()
->scalarPrototype()->end()
->end()
->arrayNode('allow_attributes')
Expand Down