changed the bundle name to be the class name of the bundle, not the last part of the namespace
changed the bundle name to be the class name of the bundle, not the last part of the namespace

Let's take some examples to explain the change.

First, if you don't use any vendored bundles, this commit does not change anything.

So, let's say you use a FooBundle from Sensio. The files are stored under Bundle\Sensio\FooBundle.
And the Bundle class is Bundle\Sensio\FooBundle\SensioFooBundle.php.

Before the change, the bundle name ($bundle->getName()) would have returned 'FooBundle'.
Now it returns 'SensioFooBundle'.

Why does it matter? Well, it makes template names and controller names easier to read:

Before:

    Template: Sensio\FooBundle:Bar:index.twig.html
    Controller: Sensio\FooBundle:Bar:indexAction

After

    Template: SensioFooBundle:Bar:index.twig.html
    Controller: SensioFooBundle:Bar:indexAction

NB: Even if the change seems simple enough, the implementation is not. As finding
the namespace from the bundle class name is not trivial

NB2: If you don't follow the bundle name best practices, this will probably
leads to unexpected behaviors.

skafandri/DoctrineBundle,lafourchette/DoctrineBundle,OskarStark/DoctrineBundle,javiereguiluz/DoctrineBundle,Soullivaneuh/DoctrineBundle,javiereguiluz/DoctrineBundle,doctrine/DoctrineBundle,nicolas-grekas/DoctrineBundle,mikeSimonson/DoctrineBundle,fabpot/DoctrineBundle,fervo/DoctrineBundle,stof/DoctrineBundle,fabpot/DoctrineBundle,fervo/DoctrineBundle,hason/DoctrineBundle,nicolas-grekas/DoctrineBundle,chrisguitarguy/DoctrineBundle,chrisguitarguy/DoctrineBundle,hacfi/DoctrineBundle,dunglas/DoctrineBundle,gencer/DoctrineBundle,skafandri/DoctrineBundle,hason/DoctrineBundle,hacfi/DoctrineBundle,OskarStark/DoctrineBundle,gencer/DoctrineBundle,mikeSimonson/DoctrineBundle,Soullivaneuh/DoctrineBundle