Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Orphaned

85574[WIP][FEATURE] Language-aware slugs and slug normalizer API

Mathias Bolt Lesniak CR -2 V -1 Hard +762 −187 updated 08/07/25, 19:01

Commit message

-----------------------------------------------------------

  * YAML Scenario data import issue within functional
    test setup. Scanning for siteconfig on page records
    not persisted yet (pre fill) for new records. See
    code comment
  * Needs specialized tests for both slug handler variants
    based on feature flag

  * code comments (clases/methods/...)
  * adjust ReST file based on changed PHP api structure

-----------------------------------------------------------

This feature introduces language-awareness to slug generation and a
new API for creating custom slug normalizers.

Traditional, non-language-aware slug generation is now performed by
`TYPO3\CMS\Core\Slug\LegacySlugNormalizer`. It is the default slug
normalizer. A new slug normalizer based on Symfony's `AsciiSlugger`
is introduced: `TYPO3\CMS\Core\Slug\AsciiSlugNormalizer`

The default normalizer can be configured by setting
`$GLOBALS['TYPO3_CONF_VARS']['SYS']['defaultSlugNormalizer']`to any
class that implements `TYPO3\CMS\Core\Slug\SlugNormalizerInterface`.

This makes `symfony/string` a core dependency, although it is already
included through other Symfony dependencies.

Used command(s):

\
    Build/Scripts/runTests.sh -s composer -- require \
        --no-update -d typo3/sysext/core \
        "symfony/string":"^7.1.4" && \
    Build/Scripts/runTests.sh -s composer -- require \
        "symfony/string":"^7.1.4"

**reset**

\
    git co origin/main composer.json && \
    git co origin/main composer.lock && \
    git co origin/main typo3/sysext/core/composer.json && \
    Build/Scripts/runTests.sh -s composerInstall

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 16
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/74/85574/16 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/74/85574/16 && git cherry-pick FETCH_HEAD

Review

  • Code review CR -2 Blocked
    • Stefan Bürk -2
  • Verified V -1 Blocked
    • core-ci -1 CI

Issues 1

Files 19

Review log 2743

Show 1218 earlier messages
  1. Mathias Bolt Lesniak uploaded patch set 1 08/09/24, 14:34

  2. core-ci voted on patch set 1 V -1 08/09/24, 14:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63145

  3. Garvin Hicking commented on patch set 1 08/09/24, 21:56

    Feature-104126-AddConfigurationSettingToDefineBackendLockingFile.rst:6

    Something with the patch's HEAD relation must've been wrong, this file should not get deleted. Any other change that might be unwanted, too?

    Feature-20612-LanguageAwareSlugs.rst:17

    Even thoufh Hitherto sounds funny, maybe we should not make poor german integrators open up their dictionaries, so maybe use easier language here? *g*
  4. Chris Müller commented on patch set 1 08/10/24, 07:48

    Feature-20612-LanguageAwareSlugs.rst:18

    Two underscores are missing after the last backtick, so it is rendered correctly as external link.

    Feature-20612-LanguageAwareSlugs.rst:31

    Avaliable -> Available

    Feature-20612-LanguageAwareSlugs.rst:91

    I suggest to add a :caption:, like "EXT:my_extension/Classes/Slug/EmojiSlugNormalizer.php" for easy adoption by the reader.

    Feature-20612-LanguageAwareSlugs.rst:113

    This should be a short summary of the feature (not "None now.").
  5. Chris Müller commented on patch set 1 08/10/24, 07:50

    LegacySlugNormalizer.php:30

    Maybe add @deprecated to it (see also my comment on the rst file).

    Feature-20612-LanguageAwareSlugs.rst:115

    As LegacySlugNormalizer is marked as internal, it might not be necessary to deprecate it. Or, when dit should be deprecated, this should also be stated in the class with @deprecated.
  6. Mathias Bolt Lesniak uploaded patch set 2 V -1 08/12/24, 09:21

  7. Mathias Bolt Lesniak commented on patch set 2 08/12/24, 09:28

    LegacySlugNormalizer.php:30 Reply Unresolved

    I don't know. @stefan@buerk.tech will have to give his input on what the correct strategy would be.

    Feature-104126-AddConfigurationSettingToDefineBackendLockingFile.rst:6 Reply

    Thanks for noticing! This is fixed in patchset 2.

    Feature-20612-LanguageAwareSlugs.rst:17 Reply

    I have changed "Hitherto" to "Until now" in patchset 2.

    Feature-20612-LanguageAwareSlugs.rst:18 Reply

    Thanks for noticing. This is fixed in patchset 2.

    Feature-20612-LanguageAwareSlugs.rst:31 Reply

    Thanks for noticing. This is fixed in patchset 2.

    Feature-20612-LanguageAwareSlugs.rst:91 Reply

    Thanks for the suggestion. This is fixed in patchset 2.

    Feature-20612-LanguageAwareSlugs.rst:113 Reply Unresolved

    Thanks for the input. This should look better in patchset 2. What do you think?

    Feature-20612-LanguageAwareSlugs.rst:115 Reply Unresolved

    I don't know. @stefan@buerk.tech will have to give his input on what the correct strategy would be.
  8. core-ci voted on patch set 2 V -1 08/12/24, 09:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63209

  9. Mathias Bolt Lesniak uploaded patch set 3 V -1 08/12/24, 09:35

  10. core-ci voted on patch set 3 V -1 08/12/24, 09:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63210

  11. Mathias Bolt Lesniak uploaded patch set 4 V -1 08/12/24, 12:36

  12. core-ci voted on patch set 4 V -1 08/12/24, 12:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63228

  13. Mathias Bolt Lesniak uploaded patch set 5 V -1 08/13/24, 08:32

  14. core-ci voted on patch set 5 V -1 08/13/24, 08:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63284

  15. Mathias Bolt Lesniak uploaded patch set 6 V -1 08/13/24, 10:40

  16. core-ci voted on patch set 6 V -1 08/13/24, 10:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63297

  17. Mathias Bolt Lesniak uploaded patch set 7 V -1 08/13/24, 13:05

  18. Mathias Bolt Lesniak uploaded patch set 8 08/13/24, 13:11

  1. core-ci voted on patch set 7 V -1 08/13/24, 13:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63310

  2. Mathias Bolt Lesniak uploaded patch set 9 08/13/24, 13:13

  3. Mathias Bolt Lesniak uploaded patch set 10 08/13/24, 13:18

  4. core-ci voted on patch set 8 V -1 08/13/24, 13:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63311

  5. core-ci voted on patch set 9 V +1 08/13/24, 13:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63313

  6. Mathias Bolt Lesniak commented on patch set 10 08/13/24, 13:30

    DataHandler.php:9867 Unresolved

    @stefan@buerk.tech As mentioned in the preceding comment, this seems to be allowed today, but should probably result in an exception. I'm allowing it here, as I had a lot of tests to fail otherwise.

    SiteBasedTestTrait.php:104

    @stefan@buerk.tech It seems like a logical inconsistency to allow a site's default language to have a non-zero language ID. If I don't add this, TYPO3 will start looking for content in the non-zero language ID.
  7. core-ci voted on patch set 10 V +1 08/13/24, 13:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63316

  8. Stefan Bürk commented on patch set 10 CR -2 08/14/24, 00:44

    Unresolved

    tmp -2 .. need to have a detailed look onto this change
  9. Stefan Bürk uploaded patch set 11 V +1 09/10/24, 11:25

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  10. Stefan Bürk commented on patch set 11 CR -2 09/10/24, 11:26

    Unresolved

    Working on this change now ...
  11. core-ci voted on patch set 11 V +1 09/10/24, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65218

  12. Stefan Bürk commented on patch set 11 09/11/24, 17:10

    SiteBasedTestTrait.php:104 Reply Unresolved

    The point is, that you changed the preset for a language which was meant to be used as "default" language to a language id - and thus needing this now. On the other hand, you changed tests to additional add that language as additional languae requireing a non-zero language id. Not sure if we keep that changing through out all tests. Need to look into it.
  13. Stefan Bürk uploaded patch set 12 V +1 09/11/24, 23:22

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  14. core-ci voted on patch set 12 V -1 09/11/24, 23:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65508

  15. Stefan Bürk uploaded patch set 13 V -1 09/11/24, 23:46

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  16. core-ci voted on patch set 13 V +1 09/11/24, 23:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65510

  17. Mathias Bolt Lesniak commented on patch set 13 09/12/24, 08:03

    AsciiSlugNormalizer.php:44 Unresolved

    `$slugNormalizerData` should be called `$slugNormalizerOptions`
  18. Benni Mack commented on patch set 13 03/04/25, 07:14

    ping here. What's blocking to make this change in a reviewable state?
  19. Benni Mack marked it work in progress 03/04/25, 07:14

  20. Garvin Hicking uploaded patch set 14 V +1 07/08/25, 07:37

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  21. core-ci voted on patch set 14 V -1 07/08/25, 07:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81462

  22. Garvin Hicking uploaded patch set 15 V -1 07/08/25, 07:52

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  23. Garvin Hicking uploaded patch set 16 07/08/25, 07:53

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  24. core-ci voted on patch set 15 V -1 07/08/25, 08:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81466

  25. core-ci voted on patch set 16 V -1 07/08/25, 08:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81467