Feature #52064

HTTP components for handling requests

Added by Bastian Waidelich about 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Should have
Category:
Http
Target version:
-
Start date:
2013-09-17
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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:

TYPO3:
  Flow:
    http:
      chain:
        'routing':
          position: 'start'
          component: TYPO3\Flow\Mvc\Routing\RoutingComponent
          componentOptions:
            'defaultDispatchComponent': 'TYPO3\Flow\Mvc\DispatchComponent'
        'standardCompliancy':
          position: 'end'
          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:

TYPO3:
  Flow:
    http:
      chain:
        'ajaxWidget':
          position: 'before routing'
          component: TYPO3\Fluid\Core\Widget\AjaxWidgetComponent

#1

Updated by Gerrit Code Review about 7 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 about 7 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 about 7 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 about 7 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 about 7 years ago

The current configuration format is:

TYPO3:
  Flow:
    http:
      chain:
        'routing':
          position: 'start'
          component: TYPO3\Flow\Mvc\Routing\RoutingComponent
          componentOptions:
            'defaultDispatchComponent': TYPO3\Flow\Mvc\DispatchComponent
        'standardCompliancy':
          position: 'end'
          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:

TYPO3:
  Flow:
    http:
      chain:
        'routing-cache-lookup':
          position: 'start'
          component: TYPO3\Flow\Mvc\Routing\RoutingCacheLookup
        'redirects':
          position: 'before routing'
          component: TYPO3\Flow\Http\Redirect\RedirectComponent
        'routing':
          component: TYPO3\Flow\Mvc\Routing\RoutingComponent
          componentOptions:
            'defaultDispatchComponent': TYPO3\Flow\Mvc\DispatchComponent
        'standardCompliancy':
          position: 'end'
          component: TYPO3\Flow\Http\Component\MakeStandardsCompliantComponent
        'routing-cache-storage':
          position: 'end'
          component: TYPO3\Flow\Mvc\Routing\RoutingCacheStorage

#6

Updated by Gerrit Code Review about 7 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 about 7 years 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 about 7 years 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 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years 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 over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF