intelephense-docs icon indicating copy to clipboard operation
intelephense-docs copied to clipboard

LS cannot find a class in the workspace

Open ivaaaan opened this issue 3 years ago • 1 comments

Hey. I'm facing with an issue when LS couldn't find a class in the workspace.

My code structure:

www/
...pages/
......some_class.php
tests/
...pages/
......SomeClassTest.php

some_class.php:

class Someclass
{

}

SomeClassTest.php:

class SomeClassTest extends Test 
{
   public function test()
   {
        $obj = new \SomeClass();
    }
}

LSP returns an error Undefined type SomeClass. It's interesting that LSP can find other classes that in the global namespace, including classes in the same directory that some_class.php file is. It's 40k lines long, btw, perhaps that's an issue?

Can you please help me to resolve this issue?

ivaaaan avatar Oct 25 '21 09:10 ivaaaan

I have this type of error with new Redis(), how to fix it?

quelilon avatar Sep 27 '23 13:09 quelilon