Fix phpstan errors from gitlab ci

Created on 20 December 2023, about 1 year ago
Updated 21 December 2024, 30 days ago

Problem/Motivation

Phpstan failed on the gitlab ci

Steps to reproduce

View the test report:
https://git.drupalcode.org/issue/restrict_ip-3401974/-/pipelines/50527

Proposed resolution

Review the issues identified and resolve them in code.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Active

Version

4.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @pilot3
  • First commit to issue fork.
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @pilot3 phpstan is still unhappy, would you like to fix that?

    ote: Using configuration file /builds/project/restrict_ip/web/modules/custom/restrict_ip/phpstan.neon.
     ------ ------------------------------------------------------------------- 
      Line   src/Service/RestrictIpService.php                                  
     ------ ------------------------------------------------------------------- 
      114    Parameter $ip2CountryLookupService of method                       
             Drupal\restrict_ip\Service\RestrictIpService::__construct() has    
             invalid type Drupal\ip2country\Ip2CountryLookup.                   
      514    Parameter $ip2CountryLookup of method                              
             Drupal\restrict_ip\Service\RestrictIpService::setIp2Country() has  
             invalid type Drupal\ip2country\Ip2CountryLookup.                   
     ------ ------------------------------------------------------------------- 
     ------ ---------------------------------------------------------------------- 
      Line   tests/src/Unit/Service/RestrictIpServiceTest.php                      
     ------ ---------------------------------------------------------------------- 
      136    @dataProvider pathInAllowedPathsDataProvider related method must be   
             static in PHPUnit 10 and newer.                                       
      179    @dataProvider whitelistDataProvider related method must be static in  
             PHPUnit 10 and newer.                                                 
      222    @dataProvider blacklistDataProvider related method must be static in  
             PHPUnit 10 and newer.                                                 
      267    @dataProvider whitelistedIpAddressesTestDataProvider related method   
             must be static in PHPUnit 10 and newer.                               
      319    @dataProvider settingsIpAddressesDataProvider related method must be  
             static in PHPUnit 10 and newer.                                       
      362    @dataProvider cleanIpAddressInputDataProvider related method must be  
             static in PHPUnit 10 and newer.                                       
     ------ ---------------------------------------------------------------------- 
     [ERROR] Found 8 errors              
    
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Fixing pipeline over on πŸ“Œ Update pipeline for 5.0.x Active

Production build 0.71.5 2024