Problem/Motivation

Amongst the current suppressions found in the PHPStan level 1 baseline, introduce by the adding of phpstan/phpstan-phpunit, is: You should use assertFoo() instead of assertSame(Foo, $actual)..

This issue exists to fix all of those.

NOTE: There's a separate issue for You should use assertNull() instead of assertSame(null, $actual). #3351060: Fix PHPStan L1 errors "You should use assertNull() instead of assertSame(null, $actual).", so these won't be fixed in here.

Steps to reproduce

- Run PHPStan on level 1 and see the above issue amongst all others.

Proposed resolution

- Solve all of the reported issues for the above mentioned.
- Run PHPStan on level 1 and don't see the above issue any more.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3351079

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

Spokje created an issue. See original summary.

spokje’s picture

Assigned: spokje » Unassigned
Status: Active » Needs review
spokje’s picture

Issue summary: View changes
spokje’s picture

Assigned: Unassigned » spokje
Status: Needs review » Needs work
spokje’s picture

Assigned: spokje » Unassigned
Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Applied the patch and searched for "assertSame" in the phpstan-baseline file and only instances I found were of " You should use assertNull() instead of assertSame.." which was handled in the other ticket.

  • catch committed 6ca4984f on 10.1.x
    Issue #3351079 by Spokje: Fix PHPStan L1 errors "You should use...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 6ca4984 and pushed to 10.1.x. Thanks!

Status: Fixed » Closed (fixed)

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