You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated messenger config has invalid signature for routing config
/** * @template TValue * @param TValue $value * @return \Symfony\Config\Framework\Messenger\RoutingConfig|$this * @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\RoutingConfig : static) */publicfunctionrouting(string$message_class, array$value = []): \Symfony\Config\Framework\Messenger\RoutingConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['routing'] = true;
$this->routing[$message_class] = $value;
return$this;
}
if (!isset($this->routing[$message_class]) || !$this->routing[$message_class] instanceof \Symfony\Config\Framework\Messenger\RoutingConfig) {
$this->_usedProperties['routing'] = true;
$this->routing[$message_class] = new \Symfony\Config\Framework\Messenger\RoutingConfig($value);
} elseif (1 < \func_num_args()) {
thrownewInvalidConfigurationException('The node created by "routing()" has already been initialized. You cannot pass values the second time you call routing().');
}
return$this->routing[$message_class];
}
above code contains dead code because $value would be always and array (ensured by native type hint), making return type always \Symfony\Config\Framework\Messenger\RoutingConfig
$value param should be type hinted as array|\Symfony\Config\Framework\Messenger\RoutingConfig
How to reproduce
Warmup fresh application with installed messenger config, and look into generated Symfony\Config\Framework\MessengerConfig
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected
6.4, 7.0, 7.1, 7.2
Description
Generated messenger config has invalid signature for
routing
configabove code contains dead code because
$value
would be always and array (ensured by native type hint), making return type always\Symfony\Config\Framework\Messenger\RoutingConfig
$value
param should be type hinted asarray|\Symfony\Config\Framework\Messenger\RoutingConfig
How to reproduce
Warmup fresh application with installed messenger config, and look into generated
Symfony\Config\Framework\MessengerConfig
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: