This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
While working on symfony/symfony-docs#11085, I felt bad about the long notations required for simple redirects and templates rendering template actions, but I love and use those features since always. Then I gave it a try yesterday night and now I realised I missed #24640 and that #25145 has been closed x).
So here we go, here's my WIP. WDYT of this implementation? ping @javiereguiluz?
I'm going to open the PR in the docs so we can discuss the DX changes there too, and keep focus on the code here.
Xml config is working properly, but the IDE cannot resolve validation/autocompletion yet, this works thanks to the loader using its constant local path.
I guess we need to create a new path on https://symfony.com/routing that we need to declare explicitly in config/routes.xml or any xml file where this feature should be used, are you the one handling this @fabpot? Can you help me on this?
Apart this last points, the feature is ready from side, only reviews needed now :), thanks!
Thanks for working on this. To make this feature completely self-explanatory, I think we should rename redirect-to as redirect-to-route (we already have redirect-to-url). What do you think?
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Fixed XML options resolution
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Found this bug while adding tests in #30501. I need it to be merged upward so it can get green there.
Thanks!
Commits
-------
53a6ff8 [Routing] Fixed XML options resolution
HeahDude
changed the title
[FrameworkBundle][Routing] added a RoutingConfigurator to handle template and redirect
[FrameworkBundle][Routing] added proper Loader namespace to handle controllers
Mar 13, 2019
… "format" in configuration (Jules Pietri)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | symfony/symfony-docs#11126
A sibling to #30501, everything is in the title :).
Commits
-------
2911490 [Routing] Exposed "utf8" option, defaults "locale" and "format" in configuration
…le template and redirect controllers (HeahDude)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[FrameworkBundle][Routing] added Configurators to handle template and redirect controllers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | let's see
| Fixed tickets | partially #24640, #25145
| License | MIT
| Doc PR | symfony/symfony-docs#11120
While working on symfony/symfony-docs#11085, I felt bad about the long notations required for simple [redirects](https://symfony.com/doc/current/routing/redirect_in_config.html) and [templates rendering](https://symfony.com/doc/current/templating/render_without_controller.html) template actions, but I love and use those features since always. Then I gave it a try yesterday night and now I realised I missed #24640 and that #25145 has been closed x).
So here we go, here's my WIP. WDYT of this implementation? ping @javiereguiluz?
I'm going to open the PR in the docs so we can discuss the DX changes there too, and keep focus on the code here.
Cheers!
EDIT
----
This PR now only update PHP-DSL configurators.
______________
TODO:
- [x] gather reviews
- ~[x] fix xml schema~
- [x] add some tests
- ~[ ] handle xsd auto discovery~
- [x] rebase on top of #30507
- [x] ~add shortcuts for #30514~
Commits
-------
de74794 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers
…ude)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Routing] marked configurators traits as internal
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#30501 (comment) <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | not needed
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch master.
-->
Commits
-------
52efec7 [Routing] marked configurators traits as internal
…d Configurators to handle template and redirect controllers (HeahDude)" (nicolas-grekas)
This PR was merged into the 5.1-dev branch.
Discussion
----------
Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This reverts commit 477ee19, reversing changes made to 9bfa258.
The reverted PR is #30501. Actually, it's a partial revert: changes made to the `Routing` component are not reverted.
The reason for this revert is that a discussion is still on-going in #35653 (which provides the same configuration extensions to yaml+xml), and we won't be able to resolve them in time for 5.1.
Better postpone for 5.2.
@HeahDude I invite you to open a PR after this one, reverting this very PR, which we'll consider again but for 5.2 if you don't mind.
Commits
-------
e4e8945 Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"
vjandrea
pushed a commit
to vjandrea/symfony
that referenced
this pull request
Apr 25, 2020
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on symfony/symfony-docs#11085, I felt bad about the long notations required for simple redirects and templates rendering template actions, but I love and use those features since always. Then I gave it a try yesterday night and now I realised I missed #24640 and that #25145 has been closed x).
So here we go, here's my WIP. WDYT of this implementation? ping @javiereguiluz?
I'm going to open the PR in the docs so we can discuss the DX changes there too, and keep focus on the code here.
Cheers!
EDIT
This PR now only update PHP-DSL configurators.
TODO:
[x] fix xml schema[ ] handle xsd auto discoveryadd shortcuts for [FrameworkBundle] Add a controller to send simple HTTP responses #30514