From: Raphaƫl Gertz Date: Tue, 14 Oct 2025 09:28:22 +0000 (+0200) Subject: Rename rapsys_blog bundle alias to rapsysblog X-Git-Tag: 0.0.1~44 X-Git-Url: https://git.rapsys.eu/blogbundle/commitdiff_plain/82dd6da47629298d0d3eb9cbc509d5011a3cbfb2 Rename rapsys_blog bundle alias to rapsysblog Add version --- 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'; + } }