Task #88717

Epic #88540: Reduce dependencies to TSFE in Frontend Request Workflow

Rework TSFE dependencies

Added by Benni Mack 13 days ago. Updated about 17 hours ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Frontend
Start date:
2019-07-13
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

TSFE has too many dependencies. In TYPO3 v9 this was necessary with middlewares to be as "non-breaking" as possible. For TYPO3 v10, this should be re-ordered.

TSFE should get proper dependencies injected.
Anything that is not seriously related to TSFE should be handled BEFORE TSFE is instantiated in the frontend request workflow.


Subtasks

Bug #88747: Clean up TSFE constructor initializationClosedBenni Mack


Related issues

Related to TYPO3 Core - Bug #88751: Admin panel breaks frontend Under Review 2019-07-14

Associated revisions

Revision e50b1c1a (diff)
Added by Benni Mack 11 days ago

[!!!][TASK] Remove dependencies of TSFE

This patch re-arranges the TYPO3 Core internally used
middlewares for lifting off the weight of $GLOBALS['TSFE']
as Site Handling already introduced a lot of functionality
which can now be utilized further.

For this reason, the Frontend Rendering chain has
been adapted.

  • If there is a "Site" + "Language" resolved, this information can
    be used directly, as there are no dependencies currently.
  • Frontend + Backend User Authentication works regardless
    of TSFE, Frontend User is added to the Request object as
    attribute to be added to TSFE later-on.
  • Resolving the Page ("slug") and mapping them to Page
    Arguments (URL parts + GET parameters) as well as validation
    against cHash is fully decoupled from TSFE.

After that, TSFE is instantiated, which now gets all resolved
objects injected.

TSFE now only resolves the rootline against the proper permissions
(auth) and validates the final page. Once done, TypoScript is
compiled / cached.

TSFE still contains the rootline, TypoScript, and the information
about which non-cacheables are there.

RequestHandler creates or fetches cached content, but currently piped
through TSFE. This should be simplified further later-on.

Resolves: #88717
Releases: master
Change-Id: I12807455fd8b01493b2da45cf73a5c532b108cbe
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>
Reviewed-by: Andreas Fernandez <>

Revision ca166d8c (diff)
Added by Benni Mack 6 days ago

[TASK] Clean up TSFE constructor initialization

Due to e50b1c1acdd5da514a35f837d9b853692bcfa16d
the TypoScriptFrontendController requires four objects
as constructor arguments while keeping maximum
compatibility by fetching fallback information from the
current PSR-7 object or setting data from the legacy arguments.

The constructor is cleaned up with special initialize methods
for readability.

Resolves: #88747
Related: #88717
Releases: master
Change-Id: I734d1184780b8bfdf0e9638aca75c6a4fc0f7e2c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61289
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Georg Ringer <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Georg Ringer <>

History

#1 Updated by Gerrit Code Review 13 days ago

  • Status changed from New to Under Review

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#2 Updated by Gerrit Code Review 13 days ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#3 Updated by Gerrit Code Review 13 days ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#4 Updated by Gerrit Code Review 13 days ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#5 Updated by Gerrit Code Review 12 days ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#6 Updated by Gerrit Code Review 12 days ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#7 Updated by Gerrit Code Review 12 days ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#8 Updated by Gerrit Code Review 12 days ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#9 Updated by Gerrit Code Review 12 days ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#10 Updated by Gerrit Code Review 11 days ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#11 Updated by Gerrit Code Review 11 days ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#12 Updated by Gerrit Code Review 11 days ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#13 Updated by Gerrit Code Review 11 days ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61155

#14 Updated by Benni Mack 11 days ago

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

#15 Updated by Andreas Fernandez 10 days ago

  • Related to Bug #88751: Admin panel breaks frontend added

#16 Updated by Benni Mack about 17 hours ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF