PHPStan checks result in warnings

Created on 20 November 2023, 12 months ago
Updated 23 January 2024, 10 months ago

Problem/Motivation

PHPStan checks run by GitLab CI result in warnings.

------ ------------------------------------------------------------------------------ 
  Line   src/Plugin/Field/FieldWidget/RemoteStreamWrapperWidget.php                    
 ------ ------------------------------------------------------------------------------ 
  46     Unsafe usage of new static().                                                 
         πŸ’‘ See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 ------ ---------------------------------------------------------------------------------------------- 
  Line   tests/src/Functional/RemoteStreamWrapperWidgetTest.php                                        
 ------ ---------------------------------------------------------------------------------------------- 
  14     Drupal\Tests\BrowserTestBase::$defaultTheme is required. See                                  
         https://www.drupal.org/node/3083055, which includes recommendations                           
         on which theme to use.                                                                        
  19     Property                                                                                      
         Drupal\Tests\remote_stream_wrapper_widget\Functional\RemoteStreamWrapperWidgetTest::$modules  
         property must be protected.                                                                   
         πŸ’‘ Change record: https://www.drupal.org/node/2909426                                         
  59     Return type mixed of method                                                                   
         Drupal\Tests\remote_stream_wrapper_widget\Functional\RemoteStreamWrapperWidgetTest::setUp()   
         is not covariant with return type void of method                                              
         Drupal\Tests\BrowserTestBase::setUp().                                                        
 ------ ----------------------------------------------------------------------------------------------

Proposed resolution

Resolve PHPStan warnings.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States markdorison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024