88005[FEATURE] Introduce regex based replacements for slugs
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Stefan Bürk +1
-
Verified V +2 Done
- Benni Mack +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 3
Review log 2228
Show 23 earlier messages
-
André Buchmann uploaded patch set 1 02/03/25, 21:41
-
core-ci voted on patch set 1 V +1 02/03/25, 21:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73447
-
Mathias Brodala commented on patch set 1 02/03/25, 22:40
-
Garvin Hicking commented on patch set 1 02/04/25, 06:19
How about using a new "regexpReplacements" key instead? That would also allow to use custom regexp delimiters (I often use '@' instead of '/'), and prevent the hardcoded quoting? (this would then classify as a feature instead of task, limiting it to main - but I think due to a possibly breakig change we should prefer that?) -
André Buchmann uploaded patch set 2
V +102/04/25, 09:53 -
Mathias Brodala commented on patch set 2 02/04/25, 09:57
SlugHelper.php:167This is obsolete now and must be removed.Feature-106072-IntroduceRegexBasedReplacementsForSlugs.rst:27Replace ... with "bar", ignoring casingFeature-106072-IntroduceRegexBasedReplacementsForSlugs.rst:28parenthesesSlugHelperTest.php:469ReplyDone -
André Buchmann commented on patch set 1 02/04/25, 09:58
Reply
Thanks. Creating a dedicated "regexReplacements" definition as a feature sounds way better! I've pushed a new patchset therefore. Added a test with @ delimiter to make sure this works also. However I'm thinking if it's enough to add a regexReplacements option here or if we rather should implement an event to have it customizeable? Maybe could also deprecate the postModifiers hooks in favor of events?SlugHelperTest.php:469ReplyThank you for the input. Yeah, the "/cow/i" case can be seen both ways... I'll create a new propose with a separate definition array for regex replacements. -
core-ci voted on patch set 2 V -1 02/04/25, 09:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73477
-
André Buchmann uploaded patch set 3
V -102/04/25, 09:59 -
Mathias Brodala commented on patch set 3 02/04/25, 10:02
SlugHelper.php:167ReplyDone -
core-ci voted on patch set 3 V -1 02/04/25, 10:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73478
-
André Buchmann uploaded patch set 4
V -102/04/25, 10:11 -
André Buchmann commented on patch set 4 02/04/25, 10:12
Feature-106072-IntroduceRegexBasedReplacementsForSlugs.rst:27ReplyDoneFeature-106072-IntroduceRegexBasedReplacementsForSlugs.rst:28ReplyDone -
core-ci voted on patch set 4 V +1 02/04/25, 10:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73479
-
Garvin Hicking commented on patch set 4 02/04/25, 13:21
Reply
Cool, thanks for the initiative. I do think an extra key is creating "bloat". An event sounds nice but is way harder for integrators to apply, compared to the generatorOption. Personally I'd thus be in favor of this specific regexpreplacement... -
André Buchmann commented on patch set 4 02/05/25, 11:03
Reply
okay, let's go with the generatorOption :-) -
Stefan Bürk commented on patch set 4 CR -1 02/07/25, 12:26
Need to have a look .... -
Stefan Bürk commented on patch set 4 03/27/25, 16:30
SlugHelper.php:170This is not safe. In case invalid regexp pattern is provided, it does not return a string and leading to an type error afterwards. On top of this, warnings may be emitted depending on the settings (not suppressed): > preg_replace(): Delimiter must not be alphanumeric, backslash, or NUL -
Stefan Bürk commented on patch set 4 03/27/25, 16:35
SlugHelper.php:170ReplyWith multiple patterns, no pattern is replaced when one pattern is invalid with the current solution. -
Stefan Bürk commented on patch set 4 03/27/25, 16:37
Reply
On it ... testing & fixing ... -
Stefan Bürk uploaded patch set 5
CR -1V +103/27/25, 16:56 -
Stefan Bürk uploaded patch set 6 03/27/25, 16:57
-
core-ci voted on patch set 5 V +1 03/27/25, 17:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76486
-
core-ci voted on patch set 6 V +1 03/27/25, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76487
-
Stefan Bürk voted on patch set 6 CR +1 V +1 03/27/25, 17:06
-
Benni Mack voted on patch set 6 CR +2 V +2 03/27/25, 17:12
-
Benni Mack merged patch set 7 03/27/25, 17:13
SlugHelperTest.php:469