Fix left-associative ternary deprecation warnings for PHP 7.4
This commit is contained in:
parent
571647f7bf
commit
3022a3675b
@ -110,7 +110,7 @@ class MessengerPass implements CompilerPassInterface
|
||||
if (\is_array($method)) {
|
||||
if (isset($method['bus'])) {
|
||||
if (!\in_array($method['bus'], $busIds)) {
|
||||
$messageLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : $r->implementsInterface(MessageSubscriberInterface::class) ? sprintf('returned by method "%s::getHandledMessages()"', $r->getName()) : sprintf('used as argument type in method "%s::%s()"', $r->getName(), $method);
|
||||
$messageLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : ($r->implementsInterface(MessageSubscriberInterface::class) ? sprintf('returned by method "%s::getHandledMessages()"', $r->getName()) : sprintf('used as argument type in method "%s::%s()"', $r->getName(), $method));
|
||||
|
||||
throw new RuntimeException(sprintf('Invalid configuration %s for message "%s": bus "%s" does not exist.', $messageLocation, $message, $method['bus']));
|
||||
}
|
||||
@ -123,7 +123,7 @@ class MessengerPass implements CompilerPassInterface
|
||||
}
|
||||
|
||||
if ('*' !== $message && !class_exists($message) && !interface_exists($message, false)) {
|
||||
$messageLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : $r->implementsInterface(MessageSubscriberInterface::class) ? sprintf('returned by method "%s::getHandledMessages()"', $r->getName()) : sprintf('used as argument type in method "%s::%s()"', $r->getName(), $method);
|
||||
$messageLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : ($r->implementsInterface(MessageSubscriberInterface::class) ? sprintf('returned by method "%s::getHandledMessages()"', $r->getName()) : sprintf('used as argument type in method "%s::%s()"', $r->getName(), $method));
|
||||
|
||||
throw new RuntimeException(sprintf('Invalid handler service "%s": class or interface "%s" %s not found.', $serviceId, $message, $messageLocation));
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ EOF;
|
||||
foreach ($staticRoutes as $url => $routes) {
|
||||
$code .= self::export($url)." => [\n";
|
||||
foreach ($routes as $name => list($route, $hasTrailingSlash)) {
|
||||
$code .= $this->compileRoute($route, $name, !$route->compile()->getHostVariables() ? $route->getHost() : $route->compile()->getHostRegex() ?: null, $hasTrailingSlash, false, $conditions);
|
||||
$code .= $this->compileRoute($route, $name, (!$route->compile()->getHostVariables() ? $route->getHost() : $route->compile()->getHostRegex()) ?: null, $hasTrailingSlash, false, $conditions);
|
||||
}
|
||||
$code .= "],\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user