Feature #52064
HTTP components for handling requests
Status: | Resolved | Start date: | 2013-09-17 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | Http | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No |
Description
Currently the only way to hook into the request handling process one has to use a custom RequestHandler (e.g. for CLI requests) or AOP (e.g. to capture Fluid AJAX-Widget requests).
With "HTTP components" request handling in Flow will be much more modular and flexible.
The default component chain would be something like this:
1TYPO3: 2 Flow: 3 http: 4 chain: 5 'routing': 6 position: 'start' 7 component: TYPO3\Flow\Mvc\Routing\RoutingComponent 8 componentOptions: 9 'defaultDispatchComponent': 'TYPO3\Flow\Mvc\DispatchComponent' 10 'standardCompliancy': 11 position: 'end' 12 component: TYPO3\Flow\Http\Component\MakeStandardsCompliantComponent
As you can see from the example above the component chain can be nested. So it will be possible to use the Flow Routing Framework to dispatch a 3rd party code directly for example.
For handling Fluid AJAX widget requests we no longer need AOP-hacks, but a simple HTTP component, configured like this:
1TYPO3: 2 Flow: 3 http: 4 chain: 5 'ajaxWidget': 6 position: 'before routing' 7 component: TYPO3\Fluid\Core\Widget\AjaxWidgetComponent
Associated revisions
[!!!][FEATURE] HTTP components for handling requests
Currently the only way to hook into the request handling process
one has to create a custom ``RequestHandler`` (in order to intercept
the default application flow very early) or use AOP (e.g. to capture
Fluid AJAX-Widget requests).
With this change request handling in Flow is much more modular and
flexible as it allows packages to modify the default request chain by
providing or configuring "HTTP components".
Background:
This is not a breaking change strictly speaking as it doesn't affect
the public API. It's marked as such though because it quite likely
breaks Flow applications with custom request handling.
If you created a custom ``RequestHandler`` make sure that it still
works as expected and check if its still needed or if a HTTP
component could replace it. The same is true if you hooked into the
request handling via AOP.
Change-Id: Iac1bd27cd1f2869e597b696c896633f14703ec40
Resolves: #52064
Releases: master
[BUGFIX] Properly merge request- and routing arguments
The "HTTP Components" feature (#52064) introduced a regression that
makes it very difficult to create RESTful services with Flow.
The problem is that the ``matchResults`` from the routing framework
override the arguments of the HTTP request instead of being
merged.
This change moves the merging of request- and routing arguments from
the ``ActionRequest`` to the ``DispatchComponent`` reducing the
complexity of argument merging and fixing the behavior of routing
values overriding the request arguments.
Note: This is a breaking change if you relied on the incorrect
behavior but it's not marked as such because there is no released
version that contains the regression.
Change-Id: Ida582e40c5306d5fa490c949d066e24f6dd63d09
Fixes: FLOW-43
Related: #45293
Related: #52064
Releases: master
[BUGFIX] Adjust settings schema to "HTTP components for handling requests"
This fixes the ``TYPO3.Flow.http.schema.yaml`` according to the
"HTTP Components" feature introduced with
I1e2491dba5adc125a7b85a574c9b51c9ae2ff18f
Change-Id: If8e901a1b6fd7e3f33832f6775c25cf6e2700f79
Releases: master, 2.3
Fixes: FLOW-35
Related: #52064
[BUGFIX] Adjust settings schema to "HTTP components for handling requests"
This fixes the ``TYPO3.Flow.http.schema.yaml`` according to the
"HTTP Components" feature introduced with
I1e2491dba5adc125a7b85a574c9b51c9ae2ff18f
Change-Id: If8e901a1b6fd7e3f33832f6775c25cf6e2700f79
Releases: master, 2.3
Fixes: FLOW-35
Related: #52064
[BUGFIX] Re-enable logging of ``Router::route()`` calls
With the implementation of `HTTP Components` we accidentally disabled
logging for calls to ``Router::route()``.
This patch adds the ``log()`` calls again.
Background:
The regression has been introduced with "[FEATURE] HTTP components for
handling requests" (Iac1bd27cd1f2869e597b696c896633f14703ec40).
Change-Id: I55b3c6ebf2ac84de47822477f4869dff3654e3ce
Fixes: FLOW-338
Related: #52064
Releases: master, 3.0, 2.3
[BUGFIX] Re-enable logging of ``Router::route()`` calls
With the implementation of `HTTP Components` we accidentally disabled
logging for calls to ``Router::route()``.
This patch adds the ``log()`` calls again.
Background:
The regression has been introduced with "[FEATURE] HTTP components for
handling requests" (Iac1bd27cd1f2869e597b696c896633f14703ec40).
Change-Id: I55b3c6ebf2ac84de47822477f4869dff3654e3ce
Fixes: FLOW-338
Related: #52064
Releases: master, 3.0, 2.3
[BUGFIX] Re-enable logging of ``Router::route()`` calls
With the implementation of `HTTP Components` we accidentally disabled
logging for calls to ``Router::route()``.
This patch adds the ``log()`` calls again.
Background:
The regression has been introduced with "[FEATURE] HTTP components for
handling requests" (Iac1bd27cd1f2869e597b696c896633f14703ec40).
Change-Id: I55b3c6ebf2ac84de47822477f4869dff3654e3ce
Fixes: FLOW-338
Related: #52064
Releases: master, 3.0, 2.3
History
#1 Updated by Gerrit Code Review almost 2 years ago
- Status changed from Accepted to Under Review
Patch set 12 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20821
#2 Updated by Gerrit Code Review almost 2 years ago
Patch set 13 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20821
#3 Updated by Gerrit Code Review almost 2 years ago
Patch set 14 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20821
#4 Updated by Gerrit Code Review almost 2 years ago
Patch set 15 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20821
#5 Updated by Bastian Waidelich almost 2 years ago
The current configuration format is:
1TYPO3: 2 Flow: 3 http: 4 chain: 5 'routing': 6 position: 'start' 7 component: TYPO3\Flow\Mvc\Routing\RoutingComponent 8 componentOptions: 9 'defaultDispatchComponent': TYPO3\Flow\Mvc\DispatchComponent 10 'standardCompliancy': 11 position: 'end' 12 component: TYPO3\Flow\Http\Component\MakeStandardsCompliantComponent
As a reminder:
"Routing cache"- and redirect-handling are good examples of code that should be extracted to components. The final default configuration could be:
The current configuration format is:
1TYPO3: 2 Flow: 3 http: 4 chain: 5 'routing-cache-lookup': 6 position: 'start' 7 component: TYPO3\Flow\Mvc\Routing\RoutingCacheLookup 8 'redirects': 9 position: 'before routing' 10 component: TYPO3\Flow\Http\Redirect\RedirectComponent 11 'routing': 12 component: TYPO3\Flow\Mvc\Routing\RoutingComponent 13 componentOptions: 14 'defaultDispatchComponent': TYPO3\Flow\Mvc\DispatchComponent 15 'standardCompliancy': 16 position: 'end' 17 component: TYPO3\Flow\Http\Component\MakeStandardsCompliantComponent 18 'routing-cache-storage': 19 position: 'end' 20 component: TYPO3\Flow\Mvc\Routing\RoutingCacheStorage
#6 Updated by Gerrit Code Review almost 2 years ago
Patch set 16 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20821
#7 Updated by Gerrit Code Review over 1 year ago
Patch set 17 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#8 Updated by Gerrit Code Review over 1 year ago
Patch set 18 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#9 Updated by Gerrit Code Review over 1 year ago
Patch set 19 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#10 Updated by Gerrit Code Review about 1 year ago
Patch set 20 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#11 Updated by Gerrit Code Review about 1 year ago
Patch set 21 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#12 Updated by Gerrit Code Review about 1 year ago
Patch set 22 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#13 Updated by Gerrit Code Review about 1 year ago
Patch set 23 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#14 Updated by Gerrit Code Review about 1 year ago
Patch set 24 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#15 Updated by Gerrit Code Review about 1 year ago
Patch set 25 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#16 Updated by Gerrit Code Review about 1 year ago
Patch set 26 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#17 Updated by Gerrit Code Review about 1 year ago
Patch set 27 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/20821
#18 Updated by Gerrit Code Review about 1 year ago
Patch set 28 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/20821
#19 Updated by Gerrit Code Review about 1 year ago
Patch set 29 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/20821
#20 Updated by Bastian Waidelich 12 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e51257c2a98bb899ed0d63dca9809040a57f5113.