-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Document available routing types #4973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please add accepted configuration parameters for Routing component. (section You like to know full list of configuration options) |
What more do you expect to be documented? |
I just dont know if there are more config options available for Routing. Im new to symfony, but im curious. Thanks |
You can only configure routes or import resources. Both are explained in detail in the Routing book article, the type details were the only things missing. There are some global configuration settings for the routing component which are documented in the FrameworkBundle configuration reference. |
You mean this? http://symfony.com/doc/current/reference/configuration/framework.html Yes the global config are the ones I didnt find. |
Ah, in that case: They'll be added to that article very soon. We've rewritten the complete FrameworkBundle config reference to document every available config option: #4736 |
What's the status of this issue? |
We could document this ... but let's do it very briefly. I don't think there's much to say because Symfony's behaviour here is simple, right? |
But you can find all information about formats in the doc: |
During the EU-FOSSA hackathon, we did look into this and turns out indeed everything is covered well in the documentation (as indicated by @osavchenko). So we can close this! 🎉 |
We seem to have no documentation on the available routing loader types that you configure when loading a resource in
app/config/routing.yml
. Nor do we document how Symfony determines the loader when no type is used and what the benefit of the type setting is. I've seem a couple of people asking for such docs the last weeks.I think this can be added to
book/routing
directly in the "Including External Routing Resources" section.Available loaders: yaml, php, xml, annotation (if SensioFrameworkExtraBundle is registered)
How loaders are choosen
When no type is configured, it's based on the extension. The first matching loader will be used. When a type is configured, both extension and type are taken into account. For instance, a file
custom_routing.yml
with typeyaml
will be loaded by the yaml loader, while acustom_routing.php
with typeyaml
will not be loaded, as no loader matches both the.php
extension and theyaml
type.The benefit of the type setting
Types allow you to use different loaders for the same extension, for instance a
.php
extension can be loaded by both the PHP and the annotation loader. Using the typeannotation
will make sure it's loaded by the annotation loader./refs symfony/symfony#13623
The text was updated successfully, but these errors were encountered: