Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-empty-array phpdoc is considered certain even when treatPhpDocTypesAsCertain is set to false #6260

Closed
TheNewHEROBRINEX opened this issue Dec 31, 2021 · 2 comments
Labels
Milestone

Comments

@TheNewHEROBRINEX
Copy link

Bug report

The fact that a parameter/promoted property is marked as non-empty-array should not be used by PHPStan to make suggestions when treatPhpDocTypesAsCertain is set to false in the configuration.

Code snippet that reproduces the problem

https://phpstan.org/r/d53b2ef4-e663-4a5b-856a-2c20f8c92201

Expected output

PHPStan should not complain about checking that the parameter is not an empty array

@ondrejmirtes
Copy link
Member

Yeah, this problem is specific to promoted properties.

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Feb 1, 2022
rajyan added a commit to rajyan/phpstan-src that referenced this issue Oct 9, 2022
rajyan added a commit to rajyan/phpstan-src that referenced this issue Oct 9, 2022
rajyan added a commit to rajyan/phpstan-src that referenced this issue Oct 9, 2022
rajyan added a commit to rajyan/phpstan-src that referenced this issue Oct 9, 2022
ondrejmirtes pushed a commit to rajyan/phpstan-src that referenced this issue Oct 10, 2022
ondrejmirtes pushed a commit to rajyan/phpstan-src that referenced this issue Oct 11, 2022
rajyan added a commit to rajyan/phpstan-src that referenced this issue Oct 11, 2022
ondrejmirtes pushed a commit to phpstan/phpstan-src that referenced this issue Oct 12, 2022
ondrejmirtes pushed a commit to phpstan/phpstan-src that referenced this issue Oct 12, 2022
ondrejmirtes added a commit to phpstan/phpstan-src that referenced this issue Jan 13, 2023
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants