Skip to content

refactor: add precise parameter types to Router test fixtures - #10464

Open
soccerlover29 wants to merge 2 commits into
codeigniter4:developfrom
soccerlover29:fix/router-test-fixture-param-types
Open

refactor: add precise parameter types to Router test fixtures#10464
soccerlover29 wants to merge 2 commits into
codeigniter4:developfrom
soccerlover29:fix/router-test-fixture-param-types

Conversation

@soccerlover29

Copy link
Copy Markdown
Contributor

Description

Adds specific parameter types to 10 methods across the Router test fixtures and helper classes, replacing untyped parameters that PHPStan flagged as "no type specified." All changes are in test-only files. I tested it by running a full-project PHPStan scan and all the relevant tests.

Contributes to #7731 (PHPStan "no type specified" errors).

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

@paulbalandan

Copy link
Copy Markdown
Member

Hi @soccerlover29 , instead of hand-editing the baseline files, could you run composer phpstan:baseline so that they get properly updated?

@github-actions github-actions Bot added the stale Pull requests with conflicts label Aug 17, 2026
@github-actions

This comment was marked as outdated.

@soccerlover29
soccerlover29 force-pushed the fix/router-test-fixture-param-types branch from ebc0d09 to 7a32d3f Compare August 18, 2026 15:01
@soccerlover29

Copy link
Copy Markdown
Contributor Author

The 2 failing lint checks (PHP 8.2 Lint with PHP CS Fixer / PHP 8.5 Lint with PHP CS Fixer) appear to be unrelated to this PR, since the reported violation is in tests/system/Validation/ValidationTest.php, which this PR doesn't touch.

I checked out a clean copy of develop (no changes from this PR) and ran the same check locally with PHP CS Fixer 3.95.18, and it passes with 0 violations. The CI run used 3.95.19. Looks like a formatting-rule change between those two patch versions is flagging code that was previously considered compliant, independent of anything in this diff.

@paulbalandan paulbalandan added refactor Pull requests that refactor code and removed stale Pull requests with conflicts labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants