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
psalm phpstan extension #2223
Comments
Generics support in PHPStan will read Psalm-specific annotations. No other
plans currently. It would be better to have some kind of standard instead
of vendor prefixes...
On Tue, 18 Jun 2019 at 11:42, Markus Staab ***@***.***> wrote:
Some well known open source libraries start to add psalm specific
annotations to their codebase to support advanced analysis features.
see e.g.
sebastianbergmann/phpunit#3708
<sebastianbergmann/phpunit#3708>
Ocramius/ProxyManager#465
<Ocramius/ProxyManager#465>
Ocramius/PackageVersions#89
<Ocramius/PackageVersions#89>
would it make sense to have a phpstan-psalm-extension which allows phpstan
to pickup the psalm-specific annotations and use this information while
analysis?
I wouldn't expect that phpstan supports all the things psalm already has,
but maybe there is some low hanging fruit which can help phpstan to do a
more detailed/more informed analysis..?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2223?email_source=notifications&email_token=AAAZTOA3DIJLGENJQWTZ65TP3CUYLA5CNFSM4HY6GCM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2C37WA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOHU5JIAHEGNX627L53P3CUYLANCNFSM4HY6GCMQ>
.
--
Ondřej Mirtes
|
BTW anyone can write type-specifying extension for @psalm-assert using
public PHPStan API today.
BTW2 PHPUnit’s typing in PHPStan today is supported with
phpstan/phpstan-phpunit extension.
On Tue, 18 Jun 2019 at 12:10, Ondřej Mirtes ***@***.***> wrote:
Generics support in PHPStan will read Psalm-specific annotations. No other
plans currently. It would be better to have some kind of standard instead
of vendor prefixes...
On Tue, 18 Jun 2019 at 11:42, Markus Staab ***@***.***>
wrote:
> Some well known open source libraries start to add psalm specific
> annotations to their codebase to support advanced analysis features.
>
> see e.g.
> sebastianbergmann/phpunit#3708
> <sebastianbergmann/phpunit#3708>
> Ocramius/ProxyManager#465
> <Ocramius/ProxyManager#465>
> Ocramius/PackageVersions#89
> <Ocramius/PackageVersions#89>
>
> would it make sense to have a phpstan-psalm-extension which allows
> phpstan to pickup the psalm-specific annotations and use this information
> while analysis?
>
> I wouldn't expect that phpstan supports all the things psalm already has,
> but maybe there is some low hanging fruit which can help phpstan to do a
> more detailed/more informed analysis..?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#2223?email_source=notifications&email_token=AAAZTOA3DIJLGENJQWTZ65TP3CUYLA5CNFSM4HY6GCM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2C37WA>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAAZTOHU5JIAHEGNX627L53P3CUYLANCNFSM4HY6GCMQ>
> .
>
--
Ondřej Mirtes
--
Ondřej Mirtes
|
I totally agree to have a generic standard would be best in the long or mid term.
this is correct, but having the psalm specific annotations work as a psalm-extension would open the door to all libraries which use them - without the need for a specific phpstan extension avaiable. |
Here's a list I just put together of Psalm's supported assertions: https://psalm.dev/docs/annotating_code/assertion_syntax/ |
Will close, as there is not actionable thing here and we recently implemented some of tge mentioned psalm features |
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. |
Some well known open source libraries start to add psalm specific annotations to their codebase to support advanced analysis features.
see e.g.
sebastianbergmann/phpunit#3708
Ocramius/ProxyManager#465
Ocramius/PackageVersions#89
would it make sense to have a phpstan-psalm-extension which allows phpstan to pickup the psalm-specific annotations and use this information while analysis?
I wouldn't expect that phpstan supports all the things psalm already has, but maybe there is some low hanging fruit which can help phpstan to do a more detailed/more informed analysis..?
The text was updated successfully, but these errors were encountered: