Bonjour,
j ai suivi un tuto sur github mais j'arrive pas a executé mon code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
 
namespace MyAppFilmothequeBundle\Controller;
 
 
use Symfony\Component\DependencyInjection\ContainerAware,
    Symfony\Component\HttpFoundation\RedirectResponse;
use MyAppFilmothequeBundle\Entity\Categorie;
use Sg\DatatablesBundle\Tests\Datatables\PostDatatable;
 
class DefaultController extends ContainerAware
{/**
 * @Route("/", name="post_index")
 * @Method("GET")
 */
    public function indexAction()
    {
        $datatable = $this->get('app.datatable.post');
        $datatable->buildDatatable();
 
        return $this->render('MyAppFilmothequeBundle:index.html.twig', array(
            'datatable' => $datatable,
        ));
    }
 
    /**
     * @Route("/results", name="post_results")
     */
    public function indexResultsAction()
    {
        $datatable = $this->get('app.datatable.post');
        $datatable->buildDatatable();
 
        $query = $this->get('sg_datatables.query')->getQueryFrom($datatable);
 
        return $query->getResponse();
    }
}

voila l'erreur qui s'affiche

CRITICAL - Uncaught PHP Exception Doctrine\Common\Annotations\AnnotationException: "[Semantical Error] The annotation "@Route" in method MyAppFilmothequeBundle\Controller\DefaultController::indexAction() was never imported. Did you maybe forget to add a "use" statement for this annotation?" at C:\wamp\www\my_project_name\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\AnnotationException.php line 54