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

@psalm-suppress NonInvariantDocblockPropertyType is reported as unused #5501

Closed
VincentLanglet opened this issue Mar 29, 2021 · 1 comment · Fixed by #6253
Closed

@psalm-suppress NonInvariantDocblockPropertyType is reported as unused #5501

VincentLanglet opened this issue Mar 29, 2021 · 1 comment · Fixed by #6253

Comments

@VincentLanglet
Copy link
Contributor

When running this https://psalm.dev/r/7b36c93015
with --find-unused-psalm-suppress

I get

UnusedPsalmSuppress - This suppression is never used (see https://psalm.dev/207)
     * @psalm-suppress NonInvariantDocblockPropertyType

Seems like psalm.dev is not running with find-unused-psalm-suppress so I cannot fully reproduce the bug.

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/7b36c93015
<?php

class Vendor
{
    public $config = [];
}

class A extends Vendor
{
    /**
     * @var mixed[]
     * @psalm-suppress NonInvariantDocblockPropertyType
     */
    public $config = [];
}
Psalm output (using commit d57dde0):

INFO: MissingPropertyType - 5:12 - Property Vendor::$config does not have a declared type - consider array

@orklah orklah mentioned this issue Aug 6, 2021
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 a pull request may close this issue.

1 participant