minor #28980 [Messenger] If framework.messenger.buses.X.middleware
is empty, it will be null
(sroze)
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] If `framework.messenger.buses.X.middleware` is empty, it will be `null`
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28945
| License | MIT
| Doc PR | ø
Otherwise, it would fail with the following configuration:
```yaml
framework:
messenger:
buses:
events_bus:
middleware:
# - 'some_commented_middleware'
```
Commits
-------
91a70fcd6f
If `framework.messenger.buses.X.middleware` is empty, it will be `null`
This commit is contained in:
commit
9c8d0999b3
@ -1090,7 +1090,7 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->arrayNode('middleware')
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($v) { return \is_string($v) || !\is_int(key($v)); })
|
||||
->ifTrue(function ($v) { return \is_string($v) || (\is_array($v) && !\is_int(key($v))); })
|
||||
->then(function ($v) { return array($v); })
|
||||
->end()
|
||||
->defaultValue(array())
|
||||
|
Reference in New Issue
Block a user