Skip to content

Fix union of template array-key with false losing the template - #6376

Open
calebdw wants to merge 1 commit into
phpstan:2.2.xfrom
calebdw:calebdw/push-rmpnpktlkpyn
Open

Fix union of template array-key with false losing the template#6376
calebdw wants to merge 1 commit into
phpstan:2.2.xfrom
calebdw:calebdw/push-rmpnpktlkpyn

Conversation

@calebdw

@calebdw calebdw commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Hello!

TypeCombinator flattened TemplateBenevolentUnionType into int|string before adding other members, so TKey|false became int|string|false instead of substituting TKey.

Thanks!

TypeCombinator flattened TemplateBenevolentUnionType into int|string
before adding other members, so TKey|false became int|string|false
instead of substituting TKey.
@phpstan-bot

Copy link
Copy Markdown
Collaborator

You've opened the pull request against the latest branch 2.3.x. PHPStan 2.3 is not going to be released for months. If your code is relevant on 2.2.x and you want it to be released sooner, please rebase your pull request and change its target to 2.2.x.

@calebdw
calebdw changed the base branch from 2.3.x to 2.2.x September 5, 2026 02:15
@staabm

staabm commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

please see issue-bot results, as it seems to fix/affect more open issues.

please add regression tests where you see fit.

in addition please have a look whether CI benchmark failling is a real regression. just try to run the offending benchmarks on a local machine (CI is sometimes flaky at this)

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.

3 participants