Skip to content
Snippets Groups Projects
Commit 35d96a84 authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[BUGFIX] Ensure route defaults and requirements are considered

Changes concerning route `defaults`:
+ defaults are mapped now (e.g. `1` <=> `one`)
+ defaults are applied now when having multiple parameters in a
  route path (e.g. `{default}/{required}`
+ defaults are applied now for types `Plugin` and `Extbase`
  (type `Simple` worked in most cases)
+ enforced defaults are considered now (e.g. `{!default}`
+ `Route` instances get `_appliedDefault` option set now - which
  contains deflated values and still needs to be inflated manually

Changes concerning route `requirements`:
+ requirements are deflated now for being processed as Symfony routes
  (resulting in requirements being correctly applied now in enhancers)
+ requirements are skipped now for parameters having corresponding
  aspects defined ("aspects take precedence over requirements")

References:
+ https://symfony.com/blog/new-in-symfony-4-3-always-include-route-default-values
+ https://symfony.com/doc/4.3/routing.html#parameters-validation
+ https://symfony.com/doc/4.3/routing.html#optional-parameters

Resolves: #86895
Releases: master, 9.5
Change-Id: Ia260e407dcc657a2e7c85628da9e001d94952c37
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62885


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 8f236d87
Branches
Tags
Showing
with 732 additions and 35 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment