Resolve PHPStan-Strict errors: variable.undefined

Created on 15 November 2024, 19 days ago

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 checkInternalClassCaseSensitivity: 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.

📌 Task
Status

Active

Version

11.0 🔥

Component

base system

Created by

🇦🇺Australia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dpi
  • 🇦🇺Australia dpi Perth, Australia

    Note: the changes in the MR are with polluteScopeWithLoopInitialAssignments turned off, as I believe including them right now would be an overall major style change. Instead, we may consider re-working the logic a bit.

    E.g polluteScopeWithLoopInitialAssignments disallows re-cyling the assignment part of for ($i=0; $i<3; $i++) outside of the loop. The neatest way of abiding by this configuration, is by changing things to while AFAIK.

  • 🇦🇺Australia dpi Perth, Australia
  • 🇦🇺Australia dpi Perth, Australia
  • Merge request !10196Resolve PHPStan-Strict errors: variable.undefined → (Open) created by dpi
  • Pipeline finished with Failed
    19 days ago
    Total: 109s
    #339347
  • 🇦🇺Australia dpi Perth, Australia

    These are the remaining variable.undefined items that need to be fixed with polluteScopeWithLoopInitialAssignments =false per strict rules.

  • Pipeline finished with Failed
    18 days ago
    Total: 622s
    #339368
  • Pipeline finished with Failed
    18 days ago
    Total: 101s
    #339381
  • Pipeline finished with Failed
    18 days ago
    Total: 629s
    #339390
  • Pipeline finished with Success
    18 days ago
    Total: 641s
    #340018
Production build 0.71.5 2024