From 9b650f902e0941b0cae842af67f62801ec3ed32a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 7 Mar 2024 20:46:21 +0100 Subject: [PATCH 1/1] Shorten air bundle alias Add alias and version parameters Readd getAlias member function --- DependencyInjection/RapsysAirExtension.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/RapsysAirExtension.php b/DependencyInjection/RapsysAirExtension.php index cdfc0c4..b09b135 100644 --- a/DependencyInjection/RapsysAirExtension.php +++ b/DependencyInjection/RapsysAirExtension.php @@ -68,10 +68,16 @@ class RapsysAirExtension extends Extension implements PrependExtensionInterface $container->setParameter($alias, $config); //Store flattened array in parameters - //XXX: don't flatten rapsys_air.site.png key which is required to be an array - foreach($this->flatten($config, $alias, 10, '.', ['rapsys_air.copy', 'rapsys_air.icon', 'rapsys_air.icon.png', 'rapsys_air.logo', 'rapsys_air.facebook.apps', 'rapsys_air.locales', 'rapsys_air.languages']) as $k => $v) { + //XXX: don't flatten rapsysair.site.png key which is required to be an array + foreach($this->flatten($config, $alias, 10, '.', ['rapsysair.copy', 'rapsysair.icon', 'rapsysair.icon.png', 'rapsysair.logo', 'rapsysair.facebook.apps', 'rapsysair.locales', 'rapsysair.languages']) as $k => $v) { $container->setParameter($k, $v); } + + //Set rapsysair.alias key + $container->setParameter($alias.'.alias', $alias); + + //Set rapsysair.version key + $container->setParameter($alias.'.version', RapsysAirBundle::getVersion()); } /** @@ -111,4 +117,13 @@ class RapsysAirExtension extends Extension implements PrependExtensionInterface //Return result return $res; } + + /** + * {@inheritdoc} + * + * @xxx Required by kernel to load renamed alias configuration + */ + public function getAlias(): string { + return RapsysAirBundle::getAlias(); + } } -- 2.41.1