There are a number of phpstan issues in 2.0.x that need to be resolved. It might be possible to fix them using better comments to more clearly define what certain variables are, possibly by overriding class attributes to change the variable definition.

Issue fork metatag-3464549

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 work

I updated the gitlab-ci file to require phpstan tests pass, so now to fix the phpstan tests.

ankitv18’s picture

Can we create a child issues as phpstan having lot of issues reported.
One I can see is Avoid direct drupal calls should be work upon separately
Any thoughts? @damienmckenna

damienmckenna’s picture

I think there are only a few types of problems identified, just repeated for different classes; I'd prefer to keep it as one issue.

ankitv18’s picture

Assigned: Unassigned » ankitv18

Cool ~~ let me give a try to fix them

damienmckenna’s picture

Bumping this to 2.0.2.

damienmckenna’s picture

damienmckenna’s picture

damienmckenna’s picture

Title: Resolve phpstan issues in 2.0.x » Resolve phpstan issues
Component: Tests » Code
Assigned: ankitv18 » damienmckenna

damienmckenna changed the visibility of the branch 2.2.x to hidden.

damienmckenna’s picture

damienmckenna’s picture

Component: Code » Tests
damienmckenna’s picture

Status: Needs work » Needs review

The MR doesn't fix everything, but it's a good step forwards and additional work can be done in another issue.

  • damienmckenna committed 1a99ee85 on 2.2.x
    Issue #3464549 by damienmckenna, ankitv18: Resolve some phpstan issues.
    
damienmckenna’s picture

Title: Resolve phpstan issues » Resolve (some) phpstan issues
Version: 2.0.x-dev » 2.2.x-dev
Status: Needs review » Fixed

That's a line in the sand, more work can continue in other issues.

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.

damienmckenna’s picture

I created another issue to resolve the DI problems: #3582717: Replace \Drupal calls with dependency injection

  • damienmckenna committed 1a99ee85 on 2.3.x
    Issue #3464549 by damienmckenna, ankitv18: Resolve some phpstan issues.
    
damienmckenna’s picture

FYI the changes to MetaNameBase accidentally broke other modules, so they are being reverted in #3583643: Revert accidental API changes.

Status: Fixed » Closed (fixed)

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