Skip to content

chore: fix phpstan notice on latest 2.2.15 - #10584

Merged
samsonasik merged 3 commits into
codeigniter4:developfrom
samsonasik:chore-fix-phpstan-notice
Sep 25, 2026
Merged

samsonasik merged 3 commits into
codeigniter4:developfrom
samsonasik:chore-fix-phpstan-notice

Conversation

@samsonasik

Copy link
Copy Markdown
Member

Description

Latest phpstan 2.2.15 cause notice https://github.com/codeigniter4/CodeIgniter4/actions/runs/35972826580/job/107546273341

This PR bump to phpstan ^2.2.15 and try to fix it.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@samsonasik

Copy link
Copy Markdown
Member Author

Ready for review 👍

@samsonasik

Copy link
Copy Markdown
Member Author

I've fixed by patch in the on purpose test, no need baseline generation.

Ready for review 👍

@paulbalandan paulbalandan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why the need to assign to a local variable first? Otherwise, this looks good.

@samsonasik

Copy link
Copy Markdown
Member Author

@paulbalandan latest phpstan on direct assert same with scalar values somehow cause always true notice

@samsonasik

Copy link
Copy Markdown
Member Author

@paulbalandan thank you for the review, let's merge 👍

@samsonasik
samsonasik merged commit 3bb0f3b into codeigniter4:develop Sep 25, 2026
58 checks passed
@samsonasik
samsonasik deleted the chore-fix-phpstan-notice branch September 25, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants