Problem/Motivation

Latest build completed with validation errors being raised by the job PHPSTAN, see:
Build: https://git.drupalcode.org/project/admin_toolbar/-/pipelines/433091
Job: https://git.drupalcode.org/project/admin_toolbar/-/jobs/4465422

phpstan (next minor)

 ------ ---------------------------------------------------------------- 
  Line   admin_toolbar_tools/src/Controller/ToolbarController.php        
 ------ ---------------------------------------------------------------- 
  242    Call to deprecated method invalidateAll() of interface          
         Drupal\Core\Cache\CacheBackendInterface:                        
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use         
           CacheBackendInterface::deleteAll() or cache tag invalidation  
         instead.                                                        
         🪪  method.deprecated                                           
  282    Call to deprecated method invalidateAll() of interface          
         Drupal\Core\Cache\CacheBackendInterface:                        
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use         
           CacheBackendInterface::deleteAll() or cache tag invalidation  
         instead.                                                        
         🪪  method.deprecated                                           
 ------ ---------------------------------------------------------------- 
 ------ ---------------------------------------------------------------- 
  Line   admin_toolbar_tools/src/Form/AdminToolbarToolsSettingsForm.php  
 ------ ---------------------------------------------------------------- 
  95     Call to deprecated method invalidateAll() of interface          
         Drupal\Core\Cache\CacheBackendInterface:                        
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use         
           CacheBackendInterface::deleteAll() or cache tag invalidation  
         instead.                                                        
         🪪  method.deprecated                                           
 ------ ---------------------------------------------------------------- 
 ------ ---------------------------------------------------------------- 
  Line   src/Form/AdminToolbarSettingsForm.php                           
 ------ ---------------------------------------------------------------- 
  89     Call to deprecated method invalidateAll() of interface          
         Drupal\Core\Cache\CacheBackendInterface:                        
         in drupal:11.2.0 and is removed from drupal:12.0.0. Use         
           CacheBackendInterface::deleteAll() or cache tag invalidation  
         instead.                                                        
         🪪  method.deprecated                                           
 ------ ---------------------------------------------------------------- 
 [ERROR] Found 4 errors                  

Steps to reproduce

Run build pipeline at:
https://git.drupalcode.org/project/admin_toolbar/-/pipelines

Proposed resolution

Fixed all errors reported by the PHPSTAN job.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andresalvarez created an issue. See original summary.

dydave’s picture

Title: ESLint and PHPStan (next minor) settings. » Fix PHPStan (next minor) validation errors
Priority: Major » Normal

Hi Andres (@andresalvarez),

Thanks a lot for creating this issue.

Could we please separate the work for these two jobs in different tickets?

Let's focus on the PHPSTAN errors in this ticket please.

Could you please revert the second commit in your MR?
https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/120/di...

I think we could merge the first commit.

For ESLint: All the work has already been done in issue #3449577: GitlabCI: Fix ESLINT validation errors: Could you please help us review and test the work from MR?
https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/116

Thanks a lot for your help!

dydave’s picture

Issue summary: View changes
andres alvarez’s picture

hello @DYdave

revert corrected

dydave’s picture

Status: Active » Needs review

dydave’s picture

Status: Needs review » Fixed

Great job Andres (@andresalvarez)! Thanks a lot for your help!

I've reviewed the changes with the following points:

1 - This change was introduced in change record:
CacheBackendInterface::invalidateAll() is deprecated
See the examples of code changes before and after.

2 - Method CacheBackendInterface::deleteAll seems to have existed for a long time and more particularly on all version supported by the module: 9.5+

3 - PHPSTAN job is fixed and all the PHPUnit tests passed with the build 🟢
Build: https://git.drupalcode.org/project/admin_toolbar/-/pipelines/447025
phpstan (next minor): https://git.drupalcode.org/project/admin_toolbar/-/jobs/4647194

Therefore, the changes were merged at #7.

Latest build on 3.x seems to pass green 🟢
https://git.drupalcode.org/project/admin_toolbar/-/pipelines/447026

for all jobs, except ESLint, see #3449577: GitlabCI: Fix ESLINT validation errors.

Marking issue as Fixed for now.

Thanks again Andres for your help and the great work!
Cheers!

andres alvarez’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.