NameSchemaService: fix group pattern#758
Open
adriendupuis wants to merge 2 commits into
Open
Conversation
adriendupuis
commented
Jun 2, 2026
| $content = $this->buildTestContentObject(); | ||
| $schemas = [ | ||
| '<text1> (text)', | ||
| '<text1> (<text2>) <text1>', |
Contributor
Author
There was a problem hiding this comment.
Before, it would fail with
Array (
- 'eng-GB' => 'one (two) one'
- 'cro-HR' => 'jedan (dva) jedan'
+ 'eng-GB' => 'one (EZMETAGROUP_0) one'
+ 'cro-HR' => 'jedan (EZMETAGROUP_0) jedan'
) Array (
- 'eng-GB' => ' (two) '
- 'cro-HR' => ' (Dva) '
+ 'eng-GB' => ' (EZMETAGROUP_0) '
+ 'cro-HR' => ' (EZMETAGROUP_0) '
)
7 tasks
Before, in `<string1> (<string2>) | <datetime1> - <datetime2>`, the following "group" was found: `<string1> (<string2>) | <datetime1>`, but with this fix, no group found.
69dbf03 to
7fe2628
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description:
With this fix, parenthesis can be used in name and URL alias patterns.
Before, in
<string1> (<string2>) | <datetime1> - <datetime2>, the following "group" was found:<string1> (<string2>) | <datetime1>, but with this fix, nothing is found.Pattern:
<string1> (<string2>) | <datetime1> - <datetime2>Before: seen as
<string1> (EZMETAGROUP_0) | <datetime1> - <datetime2>but with no replacementAfter: seen as
<string1> (<string2>) | <datetime1> - <datetime2>Pattern:
<empty|(<string1> <string2>)> | (<datetime1>)Before: seen as
<empty|(EZMETAGROUP_0)> | (<datetime1>)After: seen as
<empty|(EZMETAGROUP_0)> | (<datetime1>)(no change, still as expected)Before:

After:

For QA:
Documentation: