Skip to content

chore(phpstan): restrict unsealed credential keys to string keys#1332

Open
datamweb wants to merge 1 commit into
codeigniter4:developfrom
datamweb:credential-array-string-keys
Open

chore(phpstan): restrict unsealed credential keys to string keys#1332
datamweb wants to merge 1 commit into
codeigniter4:developfrom
datamweb:credential-array-string-keys

Conversation

@datamweb
Copy link
Copy Markdown
Collaborator

@datamweb datamweb commented May 30, 2026

Description
This PR follows up on the previous change(PR #1330 ) that introduced PHPStan unsealed array shapes for authenticator credentials.

In the earlier PR, bare ... was used in array shapes. However, in PHPStan this expands to ...<array-key, mixed>, which allows both string and int keys. That is broader than intended for Shield credentials, because custom login fields are expected to be string-keyed fields.

Checklist:

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

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