bug #37774 [Console] Make sure we pass a numeric array of arguments to call_user_func_array() (derrabus)
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Make sure we pass a numeric array of arguments to call_user_func_array()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
On php 8, the unit tests fail with the following error:
```
ArgumentCountError: array_merge() does not accept unknown named parameters
```
This PR should fix the issue.
Commits
-------
67102c32e6
[Console] Make sure we pass a numeric array of arguments to call_user_func_array().
This commit is contained in:
commit
83b1d71f7f
@ -204,7 +204,7 @@ class TextDescriptor extends Descriptor
|
|||||||
// calculate max. width based on available commands per namespace
|
// calculate max. width based on available commands per namespace
|
||||||
$width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
|
$width = $this->getColumnWidth(\call_user_func_array('array_merge', array_map(function ($namespace) use ($commands) {
|
||||||
return array_intersect($namespace['commands'], array_keys($commands));
|
return array_intersect($namespace['commands'], array_keys($commands));
|
||||||
}, $namespaces)));
|
}, array_values($namespaces))));
|
||||||
|
|
||||||
if ($describedNamespace) {
|
if ($describedNamespace) {
|
||||||
$this->writeText(sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options);
|
$this->writeText(sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options);
|
||||||
|
Reference in New Issue
Block a user