Skip to content

[Refactor:InstructorUI] PHPStan 2.1.32 Compatibility Refinements#12284

Merged
williamjallen merged 5 commits intomainfrom
phpstan-upgrade-prep-2
Jan 3, 2026
Merged

[Refactor:InstructorUI] PHPStan 2.1.32 Compatibility Refinements#12284
williamjallen merged 5 commits intomainfrom
phpstan-upgrade-prep-2

Conversation

@RyanStyron
Copy link
Contributor

Why is this Change Important & Necessary?

As a continuation of #12150, before merging #12260, it is necessary to ensure that all of the code is compatible with the new version of PHPStan.

What is the New Behavior?

PHPStan 2.1.32 check now passes after this change.

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Checkout [DevDependency] Bump phpstan/phpstan from 2.1.22 to 2.1.32 in /site #12260 and then PHPStan (documentation)
  2. Run git diff main phpstan-upgrade-prep-2 | git apply to apply the changes from
    this branch
  3. Run PHPStan again and the test will pass

@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Dec 16, 2025
@RyanStyron RyanStyron changed the title [Refactor:HomePage] PHPStan 2.1.32 Compatibility Refinements [Refactor:InstructorUI] PHPStan 2.1.32 Compatibility Refinements Dec 16, 2025
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 21.69%. Comparing base (c8b5b92) to head (8b31923).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12284   +/-   ##
=========================================
  Coverage     21.69%   21.69%           
+ Complexity     9618     9617    -1     
=========================================
  Files           268      268           
  Lines         36113    36115    +2     
  Branches        478      478           
=========================================
+ Hits           7835     7836    +1     
- Misses        27804    27805    +1     
  Partials        474      474           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <83.33%> (+<0.01%) ⬆️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JManion32
Copy link
Contributor

Why are we creating a separate PR for this rather than pushing directly to #12260?

@williamjallen williamjallen self-requested a review January 3, 2026 03:57
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to In Review in Submitty Development Jan 3, 2026
@williamjallen
Copy link
Member

williamjallen commented Jan 3, 2026

@JManion32 I personally like to merge PHPStan bumps with only changes to the baseline, and then create follow-up PRs to address any new errors. That way, a PHPStan version bump will never break main. I'll handle regenerating the baseline and then removing the baseline errors in this PR.

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jan 3, 2026
@williamjallen williamjallen merged commit f4f9d30 into main Jan 3, 2026
25 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jan 3, 2026
@williamjallen williamjallen deleted the phpstan-upgrade-prep-2 branch January 3, 2026 13:40
Aaditya-2407 pushed a commit to Aaditya-2407/Submitty that referenced this pull request Jan 5, 2026
…mitty#12284)

### Why is this Change Important & Necessary?
<!-- Include any GitHub issue that is fixed/closed using "Fixes
#<number>" or "Closes #<number>" syntax.
Alternately write "Partially addresses #<number>" or "Related to
#<number>" as appropriate. -->
As a continuation of Submitty#12150, before merging
Submitty#12260, it is necessary to
ensure that all of the code is compatible with the new version of
PHPStan.

### What is the New Behavior?
<!-- Include before & after screenshots/videos if the user interface has
changed. -->
PHPStan 2.1.32 check now passes after this change.

### What steps should a reviewer take to reproduce or test the bug or
new feature?
1. Checkout Submitty#12260 and then
PHPStan
([documentation](https://submitty.org/developer/testing/linting_static_analysis))
2. Run `git diff main phpstan-upgrade-prep-2 | git apply` to apply the
changes from
this branch
3. Run PHPStan again and the test will pass

---------

Co-authored-by: William Allen <william.j.allen24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants