Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
SupportstatusCode default param when loading template directly via route#41414
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Update docs to provide info on potential new feature found here:symfony/symfony#41414
2cfa7cb tob8e9f85Comparejaviereguiluz commentedMay 26, 2021
Dale, thanks for proposing this contribution! Don't worry about the actual contribution process because we have a lot of patience with newcomers. However, if you have any questions or comments during this process or if you don't feel treated well for any reasons, please tell us so we can quickly fix that. Thanks! |
statusCode default param when loading template directly via routestatusCode default param when loading template directly via routedayallnash commentedMay 26, 2021
Thanks@javiereguiluz - I've got the PR in a state where it's passing all of the workflows now at least! |
YaFou left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Promising start!
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
statusCode default param when loading template directly via routestatusCode default param when loading template directly via routeUh oh!
There was an error while loading.Please reload this page.
dayallnash commentedMay 28, 2021
@carsonbot find me a reviewer please |
carsonbot commentedMay 28, 2021
I'm sorry. I could not find any suitable reviewer. |
dayallnash commentedMay 28, 2021
It's ok, you tried. Good bot. |
Uh oh!
There was an error while loading.Please reload this page.
GromNaN commentedMay 30, 2021
Nice feature. Useful to return a 410 when a page is removed. |
dunglas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, +1 when@derrabus' comment will be handled.
075ddea to4dec2b5Comparedayallnash commentedJun 2, 2021
Sorry about all the commits - I am still getting my head around rebasing (I normally do merging instead). PR should be in a good state now for final review. |
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/TemplateControllerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
dayallnash commentedJun 4, 2021
The failed tests on TravisCI (PHP 7.2 build) seem unrelated to my change |
derrabus commentedJun 9, 2021
There are a lot of commits in the PR that don't belong here. Can you sort that out? |
dayallnash commentedJun 9, 2021
I am trying - I just still don't understand rebasing yet. Every time I do it I am prompted to fix loads of conflicts and end up with loads of extra commits on the PR 😞 |
864dc4d toc49cf7fCompare318f0e1 to521fe37Comparefabpot commentedOct 27, 2021
To help finish this PR, I've squashed the commits, and rebased on the current 5.4 branch. |
Uh oh!
There was an error while loading.Please reload this page.
…ate directly from route using the `Symfony\Bundle\FrameworkBundle\Controller\TemplateController` controller.
521fe37 to5a7b666Comparefabpot commentedOct 27, 2021
Thank you@dayallnash. |
…(dayallnash)This PR was merged into the 5.4 branch.Discussion----------Update templates.rst for PRsymfony/symfony#41414Update docs to provide info on potential new feature found here:symfony/symfony#41414Commits-------3acf948 Update templates.rst
Uh oh!
There was an error while loading.Please reload this page.
This is my first PR to Symfony, so please be patient as I get to grips with the 'admin' process of getting everything exactly how you want it!
TODO
Summary
Added support for
statusCodedefault parameter when loading a template directly from route via theSymfony\Bundle\FrameworkBundle\Controller\TemplateControllercontroller (likethis). This will continue to default to a 200 code, but can be changed by updating your route - for instance something like this:This could be useful for when you want to render a template without adding any extra business logic in a controller, but don't want to return a 200 response.