Skip to content
Snippets Groups Projects
Commit 4e06d291 authored by Rozbeh Chiryai Sharahi's avatar Rozbeh Chiryai Sharahi Committed by Benni Mack
Browse files

[TASK] Move slug normalization into dedicated class

The current `SlugHelper` implementation make several
tasks hard to implement, for example language aware
transliteration, customization for extension tables
or 3rd party data adaptations.

It makes sense to extract the `slug (url segment)`
sanitization into a dedicated normalization class
as a preparation for further improvements and also
making the new implementation DI aware right from
the start.

Other parts will be streamlined in further changes
to modernize the slightly unhandy `SlugHelper`.

This change moves the slug normalization code now
from the `SlugHelper::sanitize()` method into a
dedicated class, adjusts the `SlugHelper` tests
and duplicate the tests for the new implementation.

Resolves: #104090
Releases: main
Change-Id: I5126dedc3c9e1e0395087f72d3aafd41c30b4980
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84608


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 4afd0c2a
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