Problem/Motivation

Fix a bunch of errors reported by PHPStan Strict with all rules disabled, i.e, the "miscellaneous" errors before we can consider introducing strict.

Most of the things identified will be easy/sane DX things.

Steps to reproduce

Add checkFunctionNameCase: true to the parameters section of core/phpstan.neon.dist and run phpstan.

Remaining tasks

  • CI Pass
  • Review.

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

Nil.

CommentFileSizeAuthor
#2 staticMethod.nameCase.neon_.txt1.46 KBdpi

Issue fork drupal-3487239

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

dpi created an issue. See original summary.

dpi’s picture

StatusFileSize
new1.46 KB
dpi’s picture

Version: 11.1.x-dev » 11.x-dev

dpi’s picture

Assigned: dpi » Unassigned
Status: Active » Needs review
smustgrave’s picture

Since phpstan-strict isn't in core should we be fixing this right now or work to get phpstan-strict into core first?

dpi’s picture

@smustgrave the issue will come for that, these batch of issues that I've created will allow us to add it without increasing the baseline.

There isn't a lot of them, and its easier to solve upfront.

dpi’s picture

smustgrave’s picture

So brought this up in slack and think these should be postponed till it’s agreed that phpstan strict will be added. Didn’t see a ticket for that discussion

smustgrave’s picture

Status: Needs review » Postponed

Only temporarily postponing pending feedback on #3487269: [meta] Resolve issues exposed by PHPStan Strict with all rules off (misc and core configuration changes)

If we decide there no harm in merging these we can put back into review and I'll put top of my list to review. Just want to make sure they'll be accepted first.

mstrelan’s picture

Issue summary: View changes
Status: Postponed » Reviewed & tested by the community

I added checkFunctionNameCase: true to the existing phpstan config and got the same result. As per #3487218-7: Resolve PHPStan-Strict errors: class.nameCase we should fix these with or without phpstan enforcement, as they are clearly incorrect.

Have updated the IS with steps to reproduce not requiring the strict package.

  • larowlan committed 2b9242c5 on 11.x
    Issue #3487239 by dpi, smustgrave, mstrelan: Resolve PHPStan-Strict...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 11.x - thanks!

Status: Fixed » Closed (fixed)

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