I'm learning to use symfony and doctrine and I'm facing to a problem I can't find a solution. It's about routing files. I have a bundle named "LinkBundle" in which I created a "routing.yml" file into "LinkBundle/Resources/config/routing.yml"
There is my routing file into app/resources :
projet_php_link:
resource: "@ProjetPhpLinkBundle/Resources/config/routing.yml"
type: annotation
prefix: /
When I go to my website, I have the following error :
Cannot load resource "@ProjetPhpLinkBundle/Resources/config/routing.yml". Make sure the "ProjetPhpLinkBundle/Resources/config/routing.yml" bundle is correctly registered and loaded in the application kernel class.
There is my AppKernel.php :
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new ProjetPhp\Bundle\UserBundle\ProjetPhpUserBundle(),
new ProjetPhp\Bundle\LinkBundle\ProjetPhpLinkBundle(),
new ProjetPhp\Bundle\TagBundle\ProjetPhpTagBundle(),
new FOS\UserBundle\FOSUserBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
Can you help me ?