Problem/Motivation

The PHPStan pipeline is failing with the following:

------ ---------------------------------------------------------------------- 
  Line   src/CountryPathDomainAliasForm.php                                    
 ------ ---------------------------------------------------------------------- 
  53     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
         🪪  globalDrupalDependencyInjection.useDependencyInjection            
 ------ ---------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   src/CountryPathDomainForm.php                                          
 ------ ----------------------------------------------------------------------- 
  31     Call to deprecated method renderPlain() of interface                   
         Drupal\Core\Render\RendererInterface:                                  
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use                
           \Drupal\Core\Render\RendererInterface::renderInIsolation() instead.  
         🪪  method.deprecated                                                  
 ------ ----------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   src/CountryPathDomainListBuilder.php                                  
 ------ ---------------------------------------------------------------------- 
  25     \Drupal calls should be avoided in classes, use dependency injection  
         instead                                                               
         🪪  globalDrupalDependencyInjection.useDependencyInjection            
 ------ ---------------------------------------------------------------------- 

Steps to reproduce

Run the gitlab pipelines!!

Proposed resolution

Resolve the issues by replacing the deprecated renderPlain() method and using proper dependency injection.

Remaining tasks

Replace deprecated renderPlain() method in src/CountryPathDomainForm.php.
Use proper dependency injection in src/CountryPathDomainAliasForm.php.
Use proper dependency injection in src/CountryPathDomainListBuilder.php.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

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

d.fisher created an issue. See original summary.

daniel.j made their first commit to this issue’s fork.

daniel.j’s picture

Status: Active » Needs review

Revoled the phpstan warnings. Tests are passing. Please review!

daniel.j’s picture

Also potentially means that Fix pipelines on 8.x-1.x can be closed?

d.fisher’s picture

Status: Needs review » Fixed

Thank you! Merged to 8.x-1.x and marking as fixed!

Status: Fixed » Closed (fixed)

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