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

Support for @phpstan-assert, -if-true, -if-false #8536

Closed
ondrejmirtes opened this issue Oct 5, 2022 · 4 comments
Closed

Support for @phpstan-assert, -if-true, -if-false #8536

ondrejmirtes opened this issue Oct 5, 2022 · 4 comments

Comments

@ondrejmirtes
Copy link

Hi, PHPStan 1.9.0 will bring support for the same assert tags Psalm already has. Besides supporting already widespread @psalm- prefix for these tags, PHPStan will also support its own tag @phpstan-. Could you please add support for @phpstan-prefixed tags so that we're cross-compatible?

Thanks :)

@psalm-github-bot
Copy link

Hey @ondrejmirtes, can you reproduce the issue on https://psalm.dev ?

@orklah
Copy link
Collaborator

orklah commented Oct 6, 2022

Thanks for bringing this up! We'll update Psalm to support those indeed!

For reference:

if (isset($parsed_docblock->tags['psalm-assert'])) {

@VincentLanglet
Copy link
Contributor

phpstan 1.9.0 is released so this it would be interesting to add this feature soon with a psalm release.

There is also

phpstan-self-out
phpstan-this-out

This seems easy to add, I opened #8654 @orklah

@orklah
Copy link
Collaborator

orklah commented Nov 3, 2022

Thanks for this! Couldn't find time to do it myself!

@orklah orklah closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants