diff --git a/src/Symfony/Framework/DoctrineBundle/Bundle.php b/src/Symfony/Framework/DoctrineBundle/DoctrineBundle.php similarity index 96% rename from src/Symfony/Framework/DoctrineBundle/Bundle.php rename to src/Symfony/Framework/DoctrineBundle/DoctrineBundle.php index a5471c12c0..bb6e9eac24 100644 --- a/src/Symfony/Framework/DoctrineBundle/Bundle.php +++ b/src/Symfony/Framework/DoctrineBundle/DoctrineBundle.php @@ -2,7 +2,7 @@ namespace Symfony\Framework\DoctrineBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; use Symfony\Components\DependencyInjection\Loader\Loader; use Symfony\Components\DependencyInjection\Loader\XmlFileLoader; @@ -25,7 +25,7 @@ use Symfony\Framework\DoctrineBundle\DependencyInjection\DoctrineExtension; * @author Fabien Potencier * @author Jonathan H. Wage */ -class Bundle extends BaseBundle +class DoctrineBundle extends Bundle { /** * Customizes the Container instance. diff --git a/src/Symfony/Framework/DoctrineMigrationsBundle/Bundle.php b/src/Symfony/Framework/DoctrineMigrationsBundle/DoctrineMigrationsBundle.php similarity index 85% rename from src/Symfony/Framework/DoctrineMigrationsBundle/Bundle.php rename to src/Symfony/Framework/DoctrineMigrationsBundle/DoctrineMigrationsBundle.php index bb26add701..410bf46bba 100644 --- a/src/Symfony/Framework/DoctrineMigrationsBundle/Bundle.php +++ b/src/Symfony/Framework/DoctrineMigrationsBundle/DoctrineMigrationsBundle.php @@ -2,7 +2,7 @@ namespace Symfony\Framework\DoctrineMigrationsBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; /* * This file is part of the Symfony framework. @@ -21,6 +21,6 @@ use Symfony\Foundation\Bundle\Bundle as BaseBundle; * @author Fabien Potencier * @author Jonathan H. Wage */ -class Bundle extends BaseBundle +class DoctrineMigrationsBundle extends Bundle { } diff --git a/src/Symfony/Framework/PropelBundle/Bundle.php b/src/Symfony/Framework/PropelBundle/PropelBundle.php similarity index 90% rename from src/Symfony/Framework/PropelBundle/Bundle.php rename to src/Symfony/Framework/PropelBundle/PropelBundle.php index b8d76d675c..242bbfcbf7 100644 --- a/src/Symfony/Framework/PropelBundle/Bundle.php +++ b/src/Symfony/Framework/PropelBundle/PropelBundle.php @@ -2,13 +2,13 @@ namespace Symfony\Framework\PropelBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; use Symfony\Components\DependencyInjection\Loader\Loader; use Symfony\Components\DependencyInjection\Loader\XmlFileLoader; use Symfony\Framework\PropelBundle\DependencyInjection\PropelExtension; -class Bundle extends BaseBundle +class PropelBundle extends Bundle { public function buildContainer(ContainerInterface $container) { diff --git a/src/Symfony/Framework/SwiftmailerBundle/Bundle.php b/src/Symfony/Framework/SwiftmailerBundle/SwiftmailerBundle.php similarity index 92% rename from src/Symfony/Framework/SwiftmailerBundle/Bundle.php rename to src/Symfony/Framework/SwiftmailerBundle/SwiftmailerBundle.php index 880b6578a5..72a4a2e0e8 100644 --- a/src/Symfony/Framework/SwiftmailerBundle/Bundle.php +++ b/src/Symfony/Framework/SwiftmailerBundle/SwiftmailerBundle.php @@ -2,7 +2,7 @@ namespace Symfony\Framework\SwiftmailerBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; use Symfony\Components\DependencyInjection\Loader\Loader; use Symfony\Framework\SwiftmailerBundle\DependencyInjection\SwiftmailerExtension; @@ -23,7 +23,7 @@ use Symfony\Framework\SwiftmailerBundle\DependencyInjection\SwiftmailerExtension * @subpackage Framework_SwiftmailerBundle * @author Fabien Potencier */ -class Bundle extends BaseBundle +class SwiftmailerBundle extends Bundle { /** * Customizes the Container instance. diff --git a/src/Symfony/Framework/TwigBundle/Bundle.php b/src/Symfony/Framework/TwigBundle/TwigBundle.php similarity index 93% rename from src/Symfony/Framework/TwigBundle/Bundle.php rename to src/Symfony/Framework/TwigBundle/TwigBundle.php index c027290593..02e6e08779 100644 --- a/src/Symfony/Framework/TwigBundle/Bundle.php +++ b/src/Symfony/Framework/TwigBundle/TwigBundle.php @@ -2,7 +2,7 @@ namespace Symfony\Framework\TwigBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; use Symfony\Components\DependencyInjection\Loader\Loader; use Symfony\Components\DependencyInjection\Loader\XmlFileLoader; @@ -25,7 +25,7 @@ use Symfony\Framework\TwigBundle\DependencyInjection\TwigExtension; * @subpackage Framework_TwigBundle * @author Fabien Potencier */ -class Bundle extends BaseBundle +class TwigBundle extends Bundle { /** * Customizes the Container instance. diff --git a/src/Symfony/Framework/WebBundle/Command/InitBundleCommand.php b/src/Symfony/Framework/WebBundle/Command/InitBundleCommand.php index 7eafd69310..03e94652d0 100644 --- a/src/Symfony/Framework/WebBundle/Command/InitBundleCommand.php +++ b/src/Symfony/Framework/WebBundle/Command/InitBundleCommand.php @@ -77,5 +77,7 @@ class InitBundleCommand extends Command 'namespace' => $namespace, 'bundle' => $bundle, )); + + rename($targetDir.'/Bundle.php', $targetDir.'/'.$bundle.'.php'); } } diff --git a/src/Symfony/Framework/WebBundle/Controller/ControllerManager.php b/src/Symfony/Framework/WebBundle/Controller/ControllerManager.php index c7d09d2113..9eb27adc90 100644 --- a/src/Symfony/Framework/WebBundle/Controller/ControllerManager.php +++ b/src/Symfony/Framework/WebBundle/Controller/ControllerManager.php @@ -112,7 +112,7 @@ class ControllerManager $logs[] = sprintf('Failed finding controller "%s:%s" from namespace "%s" (%s)', $bundle, $controller, $namespace, $try); } } else { - if (!in_array($namespace.'\\'.$bundle.'\\Bundle', array_map(function ($bundle) { return get_class($bundle); }, $this->container->getKernelService()->getBundles()))) { + if (!in_array($namespace.'\\'.$bundle.'\\'.$bundle, array_map(function ($bundle) { return get_class($bundle); }, $this->container->getKernelService()->getBundles()))) { throw new \LogicException(sprintf('To use the "%s" controller, you first need to enable the Bundle "%s" in your Kernel class.', $try, $namespace.'\\'.$bundle)); } diff --git a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/Kernel.php b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/Kernel.php index 2e91877223..f331641a1a 100644 --- a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/Kernel.php +++ b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/xml/Kernel.php @@ -17,12 +17,12 @@ class {{ class }}Kernel extends Kernel { $bundles = array( new Symfony\Foundation\Bundle\KernelBundle(), - new Symfony\Framework\WebBundle\Bundle(), + new Symfony\Framework\WebBundle\WebBundle(), // enable third-party bundles - new Symfony\Framework\ZendBundle\Bundle(), - new Symfony\Framework\DoctrineBundle\Bundle(), - new Symfony\Framework\SwiftmailerBundle\Bundle(), + new Symfony\Framework\ZendBundle\ZendBundle(), + new Symfony\Framework\DoctrineBundle\DoctrineBundle(), + new Symfony\Framework\SwiftmailerBundle\SwiftmailerBundle(), // register your bundles here ); diff --git a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/Kernel.php b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/Kernel.php index 1befeb98e8..63b54d5bee 100644 --- a/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/Kernel.php +++ b/src/Symfony/Framework/WebBundle/Resources/skeleton/application/yaml/Kernel.php @@ -17,12 +17,12 @@ class {{ class }}Kernel extends Kernel { $bundles = array( new Symfony\Foundation\Bundle\KernelBundle(), - new Symfony\Framework\WebBundle\Bundle(), + new Symfony\Framework\WebBundle\WebBundle(), // enable third-party bundles - new Symfony\Framework\ZendBundle\Bundle(), - new Symfony\Framework\DoctrineBundle\Bundle(), - new Symfony\Framework\SwiftmailerBundle\Bundle(), + new Symfony\Framework\ZendBundle\ZendBundle(), + new Symfony\Framework\DoctrineBundle\DoctrineBundle(), + new Symfony\Framework\SwiftmailerBundle\SwiftmailerBundle(), // register your bundles here ); diff --git a/src/Symfony/Framework/WebBundle/Resources/skeleton/bundle/Bundle.php b/src/Symfony/Framework/WebBundle/Resources/skeleton/bundle/Bundle.php index 89f9b24a00..b905ac433f 100644 --- a/src/Symfony/Framework/WebBundle/Resources/skeleton/bundle/Bundle.php +++ b/src/Symfony/Framework/WebBundle/Resources/skeleton/bundle/Bundle.php @@ -2,9 +2,9 @@ namespace {{ namespace }}\{{ bundle }}; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; -class Bundle extends BaseBundle +class {{ bundle }} extends Bundle { } diff --git a/src/Symfony/Framework/WebBundle/Bundle.php b/src/Symfony/Framework/WebBundle/WebBundle.php similarity index 95% rename from src/Symfony/Framework/WebBundle/Bundle.php rename to src/Symfony/Framework/WebBundle/WebBundle.php index 5b2c5fae3e..c5fb131f44 100644 --- a/src/Symfony/Framework/WebBundle/Bundle.php +++ b/src/Symfony/Framework/WebBundle/WebBundle.php @@ -2,7 +2,7 @@ namespace Symfony\Framework\WebBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; use Symfony\Components\DependencyInjection\Loader\Loader; use Symfony\Components\DependencyInjection\Loader\XmlFileLoader; @@ -25,7 +25,7 @@ use Symfony\Framework\WebBundle\DependencyInjection\WebExtension; * @subpackage Framework_WebBundle * @author Fabien Potencier */ -class Bundle extends BaseBundle +class WebBundle extends Bundle { /** * Customizes the Container instance. diff --git a/src/Symfony/Framework/ZendBundle/Bundle.php b/src/Symfony/Framework/ZendBundle/ZendBundle.php similarity index 92% rename from src/Symfony/Framework/ZendBundle/Bundle.php rename to src/Symfony/Framework/ZendBundle/ZendBundle.php index 3e09b1ebe4..0a5ff26b3a 100644 --- a/src/Symfony/Framework/ZendBundle/Bundle.php +++ b/src/Symfony/Framework/ZendBundle/ZendBundle.php @@ -2,7 +2,7 @@ namespace Symfony\Framework\ZendBundle; -use Symfony\Foundation\Bundle\Bundle as BaseBundle; +use Symfony\Foundation\Bundle\Bundle; use Symfony\Components\DependencyInjection\ContainerInterface; use Symfony\Components\DependencyInjection\Reference; use Symfony\Components\DependencyInjection\Loader\Loader; @@ -24,7 +24,7 @@ use Symfony\Framework\ZendBundle\DependencyInjection\ZendExtension; * @subpackage Framework_ZendBundle * @author Fabien Potencier */ -class Bundle extends BaseBundle +class ZendBundle extends Bundle { /** * Customizes the Container instance.