8000 Document available routing types · Issue #4973 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
wouterj opened this issue Feb 8, 2015 · 10 comments
Closed

Document available routing types #4973

wouterj opened this issue Feb 8, 2015 · 10 comments
Labels
actionable Clear and specific issues ready for anyone to take them. ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming good first issue Ideal for your first contribution! (some Symfony experience may be required) Routing

Comments

@wouterj
Copy link
Member
wouterj commented Feb 8, 2015

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 type yaml will be loaded by the yaml loader, while a custom_routing.php with type yaml will not be loaded, as no loader matches both the .php extension and the yaml 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 type annotation will make sure it's loaded by the annotation loader.

/refs symfony/symfony#13623

@wouterj wouterj added Missing Documentation good first issue Ideal for your first contribution! (some Symfony experience may be required) actionable Clear and specific issues ready for anyone to take them. Routing labels Feb 8, 2015
@Devexar
Copy link
Devexar commented Feb 8, 2015

Please add accepted configuration parameters for Routing component. (section You like to know full list of configuration options)

@wouterj
Copy link
Member Author
wouterj commented Feb 8, 2015

What more do you expect to be documented?

@Devexar
Copy link
Devexar commented Feb 8, 2015

I just dont know if there are more config options available for Routing. Im new to symfony, but im curious. Thanks

@wouterj
Copy link
Member Author
wouterj commented Feb 8, 2015

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.

@Devexar
Copy link
Devexar commented Feb 8, 2015

You mean this? http://symfony.com/doc/current/reference/configuration/framework.html

Yes the global config are the ones I didnt find.

@wouterj
Copy link
Member Author
wouterj commented Feb 8, 2015

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

@LS05
Copy link
Contributor
LS05 commented Sep 27, 2018

What's the status of this issue?
Would like to solve it. Any suggestions?
Thank you :)

@javiereguiluz
Copy link
Member

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?

@osavchenko
Copy link
Contributor

But you can find all information about formats in the doc:
Creating routes - about different formats and how to use annotations and External resources with additional information.

@wouterj
Copy link
Member Author
wouterj commented Apr 7, 2019

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! 🎉

@wouterj wouterj closed this as completed Apr 7, 2019
@wouterj wouterj added ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming and removed ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming labels Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming good first issue Ideal for your first contribution! (some Symfony experience may be required) Routing
Projects
None yet
Development

No branches or pull requests

4 participants
0