86439[TASK] Remove unnecessary ?? operator for regex matches
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Thomas Hohn +1
- Christian Kuhn +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 3
Review log 2125
-
Markus Klein uploaded patch set 1 10/07/24, 07:26
-
Markus Klein updated the commit message in patch set 2 10/07/24, 07:28
-
Markus Klein marked it ready for review 10/07/24, 07:28
-
Thomas Hohn voted on patch set 2 CR +1 10/07/24, 07:40
-
core-ci voted on patch set 1 V -1 10/07/24, 07:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67205
-
core-ci voted on patch set 2 V -1 10/07/24, 07:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67206
-
Markus Klein uploaded patch set 3
CR +1V -110/07/24, 08:32 -
Benjamin Franzke commented on patch set 3 CR -1 10/07/24, 08:37
-
Markus Klein commented on patch set 3 10/07/24, 08:41
CKEditor5Migrator.php:715Reply* inside a character class is a literal, always. -
Markus Klein commented on patch set 3 10/07/24, 08:42
CKEditor5Migrator.php:715Reply`*` inside a character class is a literal -
Markus Klein commented on patch set 3 10/07/24, 08:44
CKEditor5Migrator.php:715ReplyThey also didn't escape it here either `[a-z0-9\-*\s]+`, which is correct. -
Markus Klein commented on patch set 3 10/07/24, 08:48
CKEditor5Migrator.php:715But this `]` was meant literal, hence the escaping needs to stay. Will revise -
core-ci voted on patch set 3 V +1 10/07/24, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67210
-
Markus Klein commented on patch set 3 10/07/24, 08:53
CKEditor5Migrator.php:715ReplyAlbeit, strictly speaking: since there is no opening character class for this one, it would be interpreted as literal `]` anyways. PHP storm inspection actually marks this as redundant. ```php preg_match('#\[[af]+]#', '[fa]', $matches); ``` this matches correctly. So the current patch set is okay; no need to put those `\` back in. -
Benjamin Franzke commented on patch set 3 CR +1 10/07/24, 09:12
CKEditor5Migrator.php:715ReplyAcknowledgedCKEditor5Migrator.php:715ReplyAcknowledged -
Benjamin Franzke commented on patch set 3 CR -1 10/07/24, 09:15
CKEditor5Migrator.php:715but this bracket should have stayed to be escaped, right? it referers to the `\[` prior to the character class. -
Markus Klein commented on patch set 3 10/07/24, 09:18
CKEditor5Migrator.php:715ReplyAs noted above, that's correct. But we move this to a dedicated change, so we get that one in. -
Markus Klein uploaded patch set 4
CR -1V +110/07/24, 09:19 -
Benjamin Franzke commented on patch set 4 CR +1 V +1 10/07/24, 09:22
CKEditor5Migrator.php:715Replyshould be explained by https://review.typo3.org/c/Packages/TYPO3.CMS/+/86439/3#message-6c512d33b2f17fc10c866cae3fdeded084b415a3 – but I don't quite get it yet, because I still think this is wrong, because a closing bracket should not be unescaped only because there is no matching opening bracket (I wouldn't follow phpstorm's recommentation here). Ack, let's keep that for separate change. -
Markus Klein commented on patch set 4 10/07/24, 09:28
CKEditor5Migrator.php:715Replythis bracket-mismatch is actually okay. a closing bracket is a literal unless you are in a character class. (at least PCRE handles it like that, not sure about the other engines) -
core-ci voted on patch set 4 V +1 10/07/24, 09:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67214
-
Thomas Hohn voted on patch set 4 CR +1 10/07/24, 15:08
-
Christian Kuhn voted on patch set 4 CR +1 V +1 10/07/24, 15:46
-
Benjamin Franzke voted on patch set 4 CR +2 V +2 10/07/24, 15:47
-
Benjamin Franzke merged patch set 5 10/07/24, 15:47
CKEditor5Migrator.php:715