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

cache issue #10239

Closed
ging-dev opened this issue Sep 30, 2023 · 0 comments · Fixed by #10240
Closed

cache issue #10239

ging-dev opened this issue Sep 30, 2023 · 0 comments · Fixed by #10240

Comments

@ging-dev
Copy link
Contributor

ging-dev commented Sep 30, 2023

sample code:

<?php

/**
 * @template K
 */
class CacheProvider
{
    /** @var K */
    private $cache;
}

run psalm with the above code, then edit the docblock of CacheProvider:

<?php

/**
 * @template T
 */
class CacheProvider
{
    /** @var K */
    private $cache;
}

Run psalm again:

  • with cache: no new error messages appear.
  • with --no-cache: Docblock-defined class, interface or enum named K does not exist (see https://psalm.dev/200)

It seems psalm doesn't re-analyze the class in case the class's docblock changes.

ging-dev added a commit to ging-dev/psalm that referenced this issue Sep 30, 2023
@ging-dev ging-dev mentioned this issue Sep 30, 2023
ging-dev added a commit to ging-dev/psalm that referenced this issue Sep 30, 2023
ging-dev added a commit to ging-dev/psalm that referenced this issue Sep 30, 2023
ging-dev added a commit to ging-dev/psalm that referenced this issue Sep 30, 2023
orklah added a commit that referenced this issue Sep 30, 2023
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