This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Bundle "MyProject" does not exist or it is not enabled.

Discuss Symfony 2 bundles here

Bundle "MyProject" does not exist or it is not enabled.

by dalben » Sat Jun 13, 2015 9:27 pm

Hi, I'm trying to create a Bundle, but when I run

Code: Select all
php app/console debug:router


the console returns
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Bundle "MyProject" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file? in @MyProject/Resources/config/routing.yml
(which is being imported from "/var/app/app/config/routing.yml"). Make sure the "MyProject" bundle is correctly registered and loaded in the application kernel class. If the bundle is
registered, make sure the bundle path "@MyProject/Resources/config/routing.yml" is not empty.

[InvalidArgumentException]
Bundle "MyProject" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file?


I've checked the correctness of the paths a hundred times. Also, I have already set up my own bundle once following the tutorial on the symfony book, but I just cannot make it work this time. Here are some pieces of files in my project that might help:

My Bundle is, in fact, registered. Here is AppKernel.php:
...
$bundles = array(
...
new AppBundle\AppBundle(),
new MyProject\MyProjectBundle()
);
...


And I have the routing all set. Here is app/config/routing.yml:
...
app:
resource: "@AppBundle/Controller/"
type: annotation

prod:
resource: "@MyProject/Resources/config/routing.yml"
prefix: /


Which links to the routing contained in my bundle:
...
prods:
path: /product/add/
defaults: { _controller: MyProject:Product:add }


Any idea of what might be causing this? Seriously, I've reviewed my configs so many times. Please, help.
dalben
Junior Member
 
Posts: 1
Joined: Sat Jun 13, 2015 9:15 pm