Skip to content

use conditional parameter for is_a() via stub#1311

Merged
ondrejmirtes merged 9 commits intophpstan: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 intophpstan:1.7.xfrom
staabm:cond-is-a-param

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented May 13, 2022

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

refs phpstan/phpstan#4371

@staabm
Copy link
Contributor Author

staabm commented May 13, 2022

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
Member

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

@staabm
Copy link
Contributor Author

staabm commented May 13, 2022

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
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