Skip to content
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

Clarify that route defaults doesn't need a route placeholder #3960

Closed
wouterj opened this issue Jun 19, 2014 · 3 comments
Closed

Clarify that route defaults doesn't need a route placeholder #3960

wouterj opened this issue Jun 19, 2014 · 3 comments
Labels
DX good first issue Ideal for your first contribution! (some Symfony experience may be required) Routing

Comments

@wouterj
Copy link
Member

wouterj commented Jun 19, 2014

Let's move some feedback given in the DX issues to the docs.

In symfony/symfony#11171 , it was made clear that people don't get clear where defaults can be used for. The documentation makes it look like it's only used to have default values for route placeholders. It turns out, you can use it for a lot more things (it's an array of route specific settings). One common used example is the _controller default.

I would suggest to add a small paragraph (or a .. sidebar:: or .. tip::) about the other uses of the defaults and how you can retrieve them from the route attributes of a route.

@iamdto
Copy link
Contributor

iamdto commented Jul 8, 2014

I'm willing to work on this but, isn't this already discussed in the Controller chapter? What specific point should we talk about? Or is this just a reminder and a clarification on of how you can use defaults in your controller?

@stof
Copy link
Member

stof commented Jul 8, 2014

@iamdto The clarification needed is that you can use some defaults for attributes which don't appear in the URL (in which case the final version of the attribute will always be the default value).

weaverryan added a commit that referenced this issue Sep 22, 2014
…amdto)

This PR was merged into the 2.3 branch.

Discussion
----------

Clarify that route defaults don't need a placeholder

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets | #3960

Commits
-------

a18e5cc Clarify that route defaults don't need a placeholder
@xabbuh
Copy link
Member

xabbuh commented Nov 1, 2014

I'm going to close this as #4017 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX 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