Skip to content

use conditional parameter for is_a() via stub#1311

Merged
ondrejmirtes merged 9 commits into
phpstan:1.7.xfrom
staabm:cond-is-a-param
May 13, 2022
Merged

use conditional parameter for is_a() via stub#1311
ondrejmirtes merged 9 commits into
phpstan:1.7.xfrom
staabm:cond-is-a-param

Conversation

@staabm

@staabm staabm commented May 13, 2022

Copy link
Copy Markdown
Contributor

is_a: if third argument is false then do not allow string in first argument

refs phpstan/phpstan#4371

@staabm

staabm commented May 13, 2022

Copy link
Copy Markdown
Contributor Author

remaining errors are caused by the more strict parameter type

@staabm staabm marked this pull request as ready for review May 13, 2022 14:21
@ondrejmirtes

Copy link
Copy Markdown
Member

What about string instead of class-string? That preserves the previous behaviour.

@staabm

staabm commented May 13, 2022

Copy link
Copy Markdown
Contributor Author

What about string instead of class-string?

I am fine with that.

@ondrejmirtes ondrejmirtes merged commit 9d9dcd8 into phpstan:1.7.x May 13, 2022
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you!

@staabm staabm deleted the cond-is-a-param branch May 13, 2022 14:48
phpstan-bot added a commit that referenced this pull request Feb 15, 2026
Closes phpstan/phpstan#1311

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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