2
votes

Since I am new to Symfony and I couldn't manage to find some useful information in google I decided to write to you. I've read about the way of loading custom DI alias information from a dependency injector in your bundle and how to create a Configuration class that will expose the alias structure. However I am to some extend confused how I can create a file, for example routing.yml, in my AcmeBundle/Resources/config/ folder and read the data from it. E.g:

some_alias:
    resource: "@AcmeBundle/Controller/"
    type:     annotation
    prefix:   /

I want to make a bundle with routing, independent from the main configuration files in the app folder.

1
stackoverflow.com/questions/37733150/… this article is another example of the same problem but it has not been answered.Любомир Борисов

1 Answers

1
votes

You can create your bundle routing.yml in your WhateverBundle/Resources/config/routing.yml and the in the app/routing.yml just include your bundle's routes.

mybundleorwhatever:
    resource: "@WhateverBundle/Resources/config/routing.xml"