-
Notifications
You must be signed in to change notification settings - Fork 32
Description
I'm tired of reporting bugs that boil down to: I edit something in a file, and something in another file doesn't get updated.
Here I had a situation like this:
- Class
A(file A) has a methodA::foo() - Class
C(file C) has a methodC::getA()that returns an instance ofA, but that is not type-hinted nor is the return type declared, so the IDE doesn't know it returns anA. - Somewhere in file B, I do
$myA = C::getA()and then call$myA->foo().
As expected, above the definition of A::foo() it said "0 references".
So I went and fixed that. I added a /** ...*/ block above the definition of C::getA() declaring that it returns an A.
Now when I'm editing file B, it recognizes the method foo in $myA->foo(), so that I can ctrl+click on it and it takes me to the definition of A::foo() in file A. And yet, it still says "0 references" above it.
Even adding and removing a space in File A and saving it didn't fix it initially. So I went and did the same on both the other two involved files and it still didn't fix it. Then I saved file A again and it finally updated.