Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add non regression test for 3506#4173

Merged
ondrejmirtes merged 1 commit into
phpstan:2.1.xfrom
VincentLanglet:fix/3506
Jul 27, 2025
Merged

Add non regression test for 3506#4173
ondrejmirtes merged 1 commit into
phpstan:2.1.xfrom
VincentLanglet:fix/3506

Conversation

@VincentLanglet
Copy link
Copy Markdown
Contributor

@VincentLanglet VincentLanglet changed the title Add non regression test Add non regression test for 3506 Jul 27, 2025
@ondrejmirtes ondrejmirtes merged commit 958d7a7 into phpstan:2.1.x Jul 27, 2025
254 checks passed
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

phpstan-bot added a commit to phpstan-bot/phpstan-src that referenced this pull request Mar 31, 2026
Restore preserveVacuousConditionals from PR phpstan#5056 and add a targeted
guard overlap check in createConditionalExpressions() to prevent
creating ambiguous conditional expressions when the guard type overlaps
with the other branch's type for the guard variable.

This preserves the improved type narrowing from phpstan#5056 (bug phpstan#4173,
#12992, #14227) while also fixing the incorrect dependent type
narrowing reported in #14411.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.

Closure signature PHPDoc seems to corrupt variadics

2 participants