Task #90247

Epic #83968: PSR-11 Initiative

Add backend routes to router using DI factories

Added by Benjamin Franzke 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Start date:
2020-01-29
Due date:
% Done:

100%

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

Description

That means Bootstrap::initializeBackendRouter() wouldn't be
required to be called explicitly from a middleware.
The Router class would always have the routes populated
whenever it is initialized.

DI factories could be used to collect and add the backend routes to the Router object.

Associated revisions

Revision 486fa5ee (diff)
Added by Benjamin Franzke 2 months ago

[TASK] Implicitly add backend routes to router using DI factories

All Routes.php information for Backend routes are now collected
via Dependency Injection.

That means Bootstrap::initializeBackendRouter() doesn't
need to be called explicitly from a middleware anymore.

The Router class will always have the routes populated
whenever it is initialized / needed.

We use DI factories to collect and add the backend routes.
The routes from the extension configuration files are still cached,
but the cache is managed by a service provider.

We adapt the ServiceProviderCompilationPass to keep track
of the return type of extended services where the extension
may not have a return type declaration (because of the
dynamic closures in PseudoServiceProvider). We do that
to properly notify symfony DI that the routes are
stored as ArrayObject.

Change-Id: Ie589825408bf9e51782800a1b8370f57d81d5178
Releases: master
Resolves: #90247
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62531
Tested-by: Benni Mack <>
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Benni Mack <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Gerrit Code Review 2 months ago

  • Status changed from New to Under Review

Patch set 4 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/+/62531

#2 Updated by Gerrit Code Review 2 months ago

Patch set 5 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/+/62531

#3 Updated by Gerrit Code Review 2 months ago

Patch set 6 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/+/62531

#4 Updated by Benjamin Franzke 2 months ago

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

#5 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF