Resolve the current phpstan failures and require phpstan to pass on all pipelines:

  Line   src/Plugin/Field/FieldFormatter/ShippingInformationFormatter.php      
 ------ ---------------------------------------------------------------------- 
  121    Call to static method fromRoute() on an unknown class                 
         Drupal\Core\Url.                                                      
         🪪  class.notFound                                                    
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols  
  168    Call to static method fromRoute() on an unknown class                 
         Drupal\Core\Url.                                                      
         🪪  class.notFound                                                    
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols  
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

damienmckenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review

Waiting for the test run to finish.

jsacksick’s picture

Status: Needs review » Needs work

The changes seem to make this worse, somehow :).
I think the report is buggy, we aren't experiencing this anywhere else...

damienmckenna’s picture

I created a separate MR that just requires the phpstan tests pass, will see how this goes.

damienmckenna’s picture

The phpstan tests are currently failing, per the MR. My attempt to fix it may need some improvement, but the problem exists.

jsacksick’s picture

Yeah, I'm aware the problem exists, but the report seems buggy... I'm not sure what's happening, because the class exists... The method exists, and have plenty of calls to that method in several of our contrib modules, and even without commerce_shipping, without any complaints... So I don't know what's going on.

tbkot made their first commit to this issue’s fork.

jsacksick’s picture

Status: Needs work » Fixed

I ended up ignoring the following path:

  excludePaths:
    - src/Plugin/Field/FieldFormatter/ShippingInformationFormatter.php

The only other thing that worked was downgrading PHPUNIT, this is a recent failure affecting recent versions of PHPSTAN which is why this isn't failed on the previous Drupal core version.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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