Reputation: 2177
I have this error when I try to proceed with Symfony 2.5:
Case mismatch between loaded and declared class names: MySpace\WelcomeBundle\Controller\HomepageController vs MySpace\WelcomeBundle\Controller\HomePageController
Here's my code in app/config/routing.yml
MySpaceWelcomeBundle:
resource: "@MySpaceBundle/Resources/config/routing.yml"
prefix: /
Here's my code in my bundle MySpace, in src/MySpace/WelcomeBundle/Controller/HomePageController.php:
<?php
namespace MySpace\WelcomeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class HomePageController extends Controller
{
public function indexAction()
{
return $this->render('MySpaceWelcomeBundle:HomePage:index.html.twig');
}
}
and finally this is my code in src/MySpace/WelcomeBundle/Ressources/config/routing.yml
MySpaceWelcomeBundle_HomePage:
pattern: /
defaults: { _controller: MySpaceWelcomeBundle:Homepage:index }
Someone could explain me exactly what is the problem?
Upvotes: 1
Views: 4186
Reputation: 4397
I guess the problem is with src/MySpace/WelcomeBundle/Ressources/config/routing.yml
, as you have Homepage
with lowecase. Try to change it to:
MySpaceWelcomeBundle_HomePage:
pattern: /
defaults: { _controller: MySpaceWelcomeBundle:HomePage:index }
Upvotes: 3