Skip to content

chore: signature for the $headers param in FeatureTestTrait::withHeaders()#9932

Merged
michalsn merged 1 commit intocodeigniter4:developfrom
michalsn:chore/feature-test
Feb 7, 2026
Merged

chore: signature for the $headers param in FeatureTestTrait::withHeaders()#9932
michalsn merged 1 commit intocodeigniter4:developfrom
michalsn:chore/feature-test

Conversation

@michalsn
Copy link
Member

@michalsn michalsn commented Feb 7, 2026

Description
This PR fixes the signature for the $headers parameter in FeatureTestTrait::withHeaders(). The type was incorrectly defined as array<string, Header|list<Header>>, but the values passed to setHeader() are raw strings (or arrays of strings), not Header objects. The correct type is array<string, string|list<string>>.

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

@michalsn michalsn added the refactor Pull requests that refactor code label Feb 7, 2026
@michalsn michalsn merged commit 1b41358 into codeigniter4:develop Feb 7, 2026
49 checks passed
@michalsn
Copy link
Member Author

michalsn commented Feb 7, 2026

Thanks for the reviews!

@michalsn michalsn deleted the chore/feature-test branch February 7, 2026 17:00
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.

3 participants