Im getting "Use of unknown class: 'IPS\Member'PHP(PHP0413)" on every repo. Like extension couldnt index my repo properly?

Thats happens when im using pre-release or release version. If i change to version to something from before 8 months it starts working.

Filip Thank you for reporting the issue.

Are the classes defined in a composer package? inside the vendor folder?

    3 months later

    Bump.. I got the same issue.. Started getting unknown class errors out of nowhere.
    Eventhough I have all classes loaded properly via composer or custom autoloader I get these :
    "Use of unknown class: 'Some\Class 'PHP(PHP0413)
    errors.

    Like Filip says the error goes away if I rollback to previous version.
    I think I've tracked it down to 1.38

    If I open the said class file in the workspace, the error goes away.

    But thats not ideal having all files open in the workspace so I am rolling back to the last 1.37.xx version for now. I dont know whats changed but can you look into it

    I dont think its my namespace mapping, because it happens with common Wordpress classes too.

      SergeyAntonov Thank you for reporting the issue, and I am sorry for the delay!

      • Are those classes defined in .php files in the vendor folder?
      • Isn't there some kind of symlinks or mapping to an external folder or network drive?

      Please also try running the Clear /vendor/ cache ... command from VSCode command palette.

        JakubMisek

        Thank you for your reply, I got it sorted out by removing composer.json -which held my custom namespace mapping-

        My class - files are properly loaded with composer autoload but somehow its the one interfering in this situation i dont know why.

        I am using composer's vendor/autoload.php , posted my custom Autoload.php for reference only

          SergeyAntonov Thank you for the details!

          It seems we probably incorrectly cached the composer packages in vendor. We'll look into it!

            Write a Reply...