Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHPStan] Aligned baseline after PHPStan update #184

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Sep 13, 2024

🎫 Issue n/a

Description:

Seems PHPStan now analyses sanity of code relying on preg_match $matches possible results.

After reviewing it a bit, I see that there's definitely a potential for improvements and there might be even some bugs.

However doing it now to fix CI is too risky and requires QA. Therefore, after talking to @Steveb-p, I created IBX-8919 for further consideration.

PHPStan failures:

 ------ ------------------------------------------------------------------------------------------------------- 
  Line   src/lib/FieldType/RichText/RichTextStorage.php                                                         
 ------ ------------------------------------------------------------------------------------------------------- 
  78     Offset 2 does not exist on array{0?: string, 1?: ''|'ezremote://', 2?: string, 3?: non-empty-string}.  
  80     Offset 2 does not exist on array{0?: string, 1: 'ezremote://', 2?: string, 3?: non-empty-string}.      
  89     Offset 1 does not exist on array{0?: string, 1?: ''|'ezremote://', 2?: string, 3?: non-empty-string}.  
  89     Offset 2 does not exist on array{0?: string, 1?: ''|'ezremote://', 2?: string, 3?: non-empty-string}.  
  89     Offset 3 does not exist on array{0?: string, 1?: ''|'ezremote://', 2?: string, 3?: non-empty-string}.  
  171    Offset 1 does not exist on array{0?: string, 1?: string, 2?: non-empty-string}.                        
  171    Offset 2 does not exist on array{0?: string, 1?: string, 2?: non-empty-string}.                        
 ------ -------------------------------------------------------------------------------------------------------  ------ --------------------------------------------------------------------------------------------- 
  Line   src/lib/RichText/Converter/Link.php                                                          
 ------ --------------------------------------------------------------------------------------------- 
  82     Offset 1 does not exist on array{0?: string, 1?: string, 2?: string, 3?: non-empty-string}.  
  82     Offset 2 does not exist on array{0?: string, 1?: string, 2?: string, 3?: non-empty-string}.  
  82     Offset 3 does not exist on array{0?: string, 1?: string, 2?: string, 3?: non-empty-string}.  
 ------ ---------------------------------------------------------------------------------------------  ------ ----------------------------------------------------------------------------------------- 
  Line   src/lib/RichText/Converter/Render/Embed.php                                              
 ------ ----------------------------------------------------------------------------------------- 
  86     Offset 1 does not exist on array{0?: string, 1?: non-empty-string, 2?: numeric-string}.  
  87     Offset 2 does not exist on array{0?: string, 1: 'ezcontent', 2?: numeric-string}.        
  97     Offset 2 does not exist on array{0?: string, 1: 'ezlocation', 2?: numeric-string}.       
 ------ -----------------------------------------------------------------------------------------  ------ ------------------------------------------------------------------------------------------------------- 
  Line   src/lib/RichText/RelationProcessor.php                                                                 
 ------ ------------------------------------------------------------------------------------------------------- 
  76     Offset 1 does not exist on array{0?: string, 1?: non-empty-string, 2?: string, 3?: non-empty-string}.  
  76     Offset 2 does not exist on array{0?: string, 1?: non-empty-string, 2?: string, 3?: non-empty-string}.  
 ------ -------------------------------------------------------------------------------------------------------  ------ ------------------------------------------------------------------------------------------------------- 
  Line   src/lib/RichText/Validator/InternalLinkValidator.php                                                   
 ------ ------------------------------------------------------------------------------------------------------- 
  67     Offset 1 does not exist on array{0?: string, 1?: non-empty-string, 2?: string, 3?: non-empty-string}.  
  67     Offset 2 does not exist on array{0?: string, 1?: non-empty-string, 2?: string, 3?: non-empty-string}.  
 ------ -------------------------------------------------------------------------------------------------------

Copy link

sonarcloud bot commented Sep 13, 2024

@alongosz alongosz requested review from Steveb-p and a team September 13, 2024 14:16
@adamwojs adamwojs merged commit 560eecf into 4.6 Sep 13, 2024
22 checks passed
@adamwojs adamwojs deleted the fix-failing-ci-4.6 branch September 13, 2024 15:59
@adamwojs
Copy link
Member

You can merge it up @alongosz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants