Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Improve the DX of TemplateController when using SF 4#24637
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
fabpot commentedOct 20, 2017
Moving to 4.1. 3.4 is closed for new features. |
derrabus commentedOct 25, 2017
@dunglas Inside a |
| return$response; | ||
| } | ||
| publicfunction__invoke($template,$maxAge =null,$sharedAge =null,$private =null) |
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.
we can now use PHP 7.1 features here
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.
done
dbbf3c1 toc14786bComparec14786b to6d15055Comparedunglas commentedDec 1, 2017
Failure not related |
Tobion commentedDec 4, 2017
Thank you@dunglas. |
… when using SF 4 (dunglas)This PR was merged into the 4.1-dev branch.Discussion----------[FrameworkBundle] Improve the DX of TemplateController when using SF 4| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aTiny DX improvement when using modern Symfony.Allow to write:```yaml# config/routes.yamlindex: path: / defaults: _controller: 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController' template: 'homepage.html.twig'```Instead of:```yamlindex: path: / defaults: _controller: 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction' template: 'homepage.html.twig'```I was thinking about doing the same for `RedirectController`, but it's not that easy because it contains two methods.Commits-------6d15055 [FrameworkBundle] Improve the DX of TemplateController when using SF 4
This PR was merged into the 4.1-dev branch.Discussion----------[DI] Allow for invokable event listeners| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->Inspired by#24637 /#25259. This adds invokable support for event listeners :)```yamlSome\Foo: tags: [{ name: kernel.event_listener, event: kernel.request }]``````phpclass Foo { public function __invoke(GetResponseEvent $event) { }}```Commits-------fa5b7eb [DI] Allow for invokable event listeners
…dunglas)This PR was merged into the 4.1 branch.Discussion----------[FrameworkBundle] Improve the DX of TemplateControllersymfony/symfony#24637Commits-------fca1a5b [FrameworkBundle] Improve the DX of TemplateController
…en using RedirectController (yceruto)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle][DX] Improving the redirect config when using RedirectController| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#12189follow-up#24637**Before:**```yaml# config/routes.yamldoc_shortcut: path: /doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction defaults: route: 'doc_page'legacy_doc: path: /legacy/doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction defaults: path: 'https://legacy.example.com/doc'```**After:**```yaml# config/routes.yamldoc_shortcut: path: /doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController defaults: route: 'doc_page'legacy_doc: path: /legacy/doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController defaults: path: 'https://legacy.example.com/doc'```See more before/after configs (XML, PHP) in doc PRsymfony/symfony-docs#12189Commits-------0ebb469 Improving redirect config when using RedirectController
…en using RedirectController (yceruto)This PR was merged into the 4.4 branch.Discussion----------[FrameworkBundle][DX] Improving the redirect config when using RedirectController| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#12189follow-upsymfony/symfony#24637**Before:**```yaml# config/routes.yamldoc_shortcut: path: /doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction defaults: route: 'doc_page'legacy_doc: path: /legacy/doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction defaults: path: 'https://legacy.example.com/doc'```**After:**```yaml# config/routes.yamldoc_shortcut: path: /doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController defaults: route: 'doc_page'legacy_doc: path: /legacy/doc controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController defaults: path: 'https://legacy.example.com/doc'```See more before/after configs (XML, PHP) in doc PRsymfony/symfony-docs#12189Commits-------0ebb469 Improving redirect config when using RedirectController
Uh oh!
There was an error while loading.Please reload this page.
Tiny DX improvement when using modern Symfony.
Allow to write:
Instead of:
I was thinking about doing the same for
RedirectController, but it's not that easy because it contains two methods.