Project

General

Profile

Actions

Task #104536

closed

Add PhpStand max failure to baseline

Added by Anja Leichsenring 3 months ago. Updated 12 days ago.

Status:
Closed
Priority:
Should have
Category:
Tests
Target version:
-
Start date:
2024-08-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

 ------ ------------------------------------------------------------------- 
  Line   core/Classes/DataHandling/SlugHelper.php                           
 ------ ------------------------------------------------------------------- 
  128    Regex pattern is invalid: Compilation failed: quantifier does not  
         follow a repeatable item at offset 5 in pattern: /.*{2,}/          
         :identification_card:  regexp.pattern                                                 
 ------ ------------------------------------------------------------------- 

We could not find the reason for that mangled regex and think it is a bug in phpstan. In order got return a nice green status to our nightly CI, the error is added to the baseline and reviewed later on, when a reason is found.

Actions #1

Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85484

Actions #2

Updated by Markus Klein 3 months ago

I found no occurrence of '.*' as a pattern.
Also it does not make sense, the line:

$value = (string)preg_replace('/' . preg_quote($fallbackCharacter) . '{2,}/', $fallbackCharacter, $value);

will never produce the regex /.*{2,}/.

Actions #3

Updated by Andreas Wolf 3 months ago

The issue was already fixed in PhpStan: https://github.com/phpstan/phpstan-src/commit/164691dfb89d73b34d46bf07fc6771e6f507d946

So it will likely be good in the next release. I would thus add a "conflict" for PhpStan 1.11.9 or change the constraint to "^1.11.8 !1.11.9".

Actions #4

Updated by Gerrit Code Review 3 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85484

Actions #5

Updated by Gerrit Code Review 3 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85484

Actions #6

Updated by Gerrit Code Review 3 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85484

Actions #7

Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85494

Actions #8

Updated by Anja Leichsenring 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack 12 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF