[FEATURE] Use symfony/routing for Site Resolving 51/57851/17
authorBenni Mack <benni@typo3.org>
Fri, 10 Aug 2018 11:38:21 +0000 (13:38 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sat, 11 Aug 2018 18:28:38 +0000 (20:28 +0200)
commita557d88d8c8707827b14b46313bb51169e94fb51
tree4a3e15ab536e660820376a350c9fe745ea04065e
parentf826facdaf7e252fa4b2963525525221267c979d
[FEATURE] Use symfony/routing for Site Resolving

Use symfony/router 4.1 for resolving a site based on the
current request.

This actually removes some simple resolving built previously
by myself, which was stupid code to detect a site base.

With the symfony/routing component, it is now possible to
have site base prefixes without a scheme (just the domain)
and allow to handle both prefixes. It is also possible to
just add "/site1" and "/site2" as base for domains as
well, allowing to listen to any incoming domain.

As this Routing component will be used for further
page-based routing, the introduced symfony-specific
code might change and encapsulated in other places.

With this patch we now require symfony 4.1 components
or higher, as symfony/routing became fast with 4.1,
and symfony/routing 4.1 is incompatible with various 3.x
components we use. Composer-based installations might
not be able to upgrade, if they have a strong
dependency on a lower symfony version.

The composer command used:
    composer req symfony/console:^4.1 symfony/expression-language:^4.1 \
    symfony/finder:^4.1 symfony/routing:^4.1 symfony/yaml:^4.1 \
    --update-with-dependencies

Resolves: #85719
Resolves: #85165
Releases: master
Change-Id: If21ff3581552ca98af28739a76236a160508f16d
Reviewed-on: https://review.typo3.org/57851
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Daniel Siepmann <daniel.siepmann@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
12 files changed:
composer.json
composer.lock
typo3/sysext/core/Classes/Site/Entity/Site.php
typo3/sysext/core/Classes/Site/SiteFinder.php
typo3/sysext/core/Documentation/Changelog/master/Feature-85719-AllowSitesWithoutSchemeOrDomain.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Important-85719-PHPPackagesSymfonyComponentsRequirementsRaisedToSymfony41.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Site/Entity/SiteTest.php
typo3/sysext/core/composer.json
typo3/sysext/form/composer.json
typo3/sysext/frontend/Classes/Middleware/SiteResolver.php
typo3/sysext/frontend/Tests/Unit/Middleware/SiteResolverTest.php [new file with mode: 0644]
typo3/sysext/install/composer.json