Problem/Motivation

For the same motivations of #3319683: Fix PHPStan errors from UserCreationTrait and AssertMailTrait, we can remove the $group parameter from the AssertContentTrait methods.

This parameter has lost its purpose since the removal of Simpletest, and removing it causes no issues since in any case PHP allows to overload a function's arguments; PHPStan level 1 will identify calls with more parameters than expected but then custom/contrib can manage the errors in their PHPStan configurations (of fix them).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3323036

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

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
mondrake’s picture

Assigned: mondrake » Unassigned
mallezie’s picture

Status: Needs review » Reviewed & tested by the community

This also looks good to me. Nice limited scope here.
As explained to me before, contrib which has phpstan in use will be noticed if they still use the $group parameter, if not and they still use it nothing will happen with php allowing function overloading.

  • longwave committed f6b1dde on 10.0.x
    Issue #3323036 by mondrake, mallezie: Remove $group parameter from...
  • longwave committed c4a3b25 on 10.1.x
    Issue #3323036 by mondrake, mallezie: Remove $group parameter from...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 10.1.x and cherry picked to 10.0.x as a low-risk tests-only change to help keep the PHPStan baseline in sync.

Committed and pushed c4a3b2558d to 10.1.x and f6b1dde1a5 to 10.0.x. Thanks!

Status: Fixed » Closed (fixed)

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