mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Refactor exception type to InvalidConfigurationException.
Replaced InvalidArgumentException with InvalidConfigurationException for widget service alias conflicts. This ensures the exception better reflects the configuration-related nature of the error.
This commit is contained in:
parent
184bb095d8
commit
68ed2db51e
@ -230,7 +230,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
|||||||
|
|
||||||
// check the alias does not exists yet
|
// check the alias does not exists yet
|
||||||
if (\array_key_exists($attr[self::WIDGET_SERVICE_TAG_ALIAS], $this->widgetServices)) {
|
if (\array_key_exists($attr[self::WIDGET_SERVICE_TAG_ALIAS], $this->widgetServices)) {
|
||||||
throw new InvalidArgumentException('a service has already be defined with the '.self::WIDGET_SERVICE_TAG_ALIAS.' '.$attr[self::WIDGET_SERVICE_TAG_ALIAS]);
|
throw new InvalidConfigurationException('a service has already be defined with the '.self::WIDGET_SERVICE_TAG_ALIAS.' '.$attr[self::WIDGET_SERVICE_TAG_ALIAS]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// register the service as available
|
// register the service as available
|
||||||
@ -259,7 +259,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
|||||||
|
|
||||||
// check the alias does not exists yet
|
// check the alias does not exists yet
|
||||||
if (\array_key_exists($alias, $this->widgetServices)) {
|
if (\array_key_exists($alias, $this->widgetServices)) {
|
||||||
throw new InvalidArgumentException('a service has already be defined with the '.self::WIDGET_SERVICE_TAG_ALIAS.' '.$alias);
|
throw new InvalidConfigurationException('a service has already be defined with the '.self::WIDGET_SERVICE_TAG_ALIAS.' '.$alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
// register the factory as available
|
// register the factory as available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user