From 82dd6da47629298d0d3eb9cbc509d5011a3cbfb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 14 Oct 2025 11:28:22 +0200 Subject: [PATCH] Rename rapsys_blog bundle alias to rapsysblog Add version --- RapsysBlogBundle.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/RapsysBlogBundle.php b/RapsysBlogBundle.php index 2e19b50..bea7223 100644 --- a/RapsysBlogBundle.php +++ b/RapsysBlogBundle.php @@ -11,16 +11,24 @@ namespace Rapsys\BlogBundle; -use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; class RapsysBlogBundle extends Bundle { + /** + * {@inheritdoc} + */ + public function getContainerExtension(): ?ExtensionInterface { + //Return created container extension + return $this->createContainerExtension(); + } + /** * Return bundle alias * * @return string The bundle alias */ - public static function getAlias(): string { + public static function getAlias(): string { //With namespace if ($npos = strrpos(static::class, '\\')) { //Set name pos @@ -40,7 +48,17 @@ class RapsysBlogBundle extends Bundle { $bpos = strlen(static::class) - $npos; } - //Return underscored lowercase bundle alias - return Container::underscore(substr(static::class, $npos, $bpos)); - } + //Return lowercase bundle alias + return strtolower(substr(static::class, $npos, $bpos)); + } + + /** + * Return bundle version + * + * @return string The bundle version + */ + public static function getVersion(): string { + //Return version + return '0.0.1'; + } } -- 2.41.3