Method not found in the class?....Sometimes.....

Am new to PHPStorm, still learning it.

I am getting Method not found in the subject class, in some files but in others it works fine

$myObj = new    Class_List_Image_Groups(TRUE, FALSE, 55);
$myObj->getAll(FALSE, 1);


So when I place mouse over Class_List_Image_Groups if finds Class
but when I place mouse over getAll it does not find Method

Now the above problem only happens in some files.... My code is working..

I already tried "invalida cache/restart"

6 comments
Comment actions Permalink

What are Common Fixes? What are common Causes for this error?

Is it code related? Does it not like very big files?

I had this 6000 line file, and I Commented out the whole file and then started uncommenting small sections at a time. One moment the "Method not found in the class" message would go away and then return,

0
Comment actions Permalink

The act of adding this one line of code


$dataExists=false;

Causes all my "Method not found in the class" headaches

SOOOOOO, Inconsistant Error message


I still have no idea how to solve it:_|

0
Comment actions Permalink

Hi there,

1) What is your PhpStorm version?
2) Can you share this large file (attach to the post)?

If invaliding caches did not helped ... then I may only suggest to disable all 3rd party (non bundled) plugins and see how it will behave this way.

In any case: please provide your idea.log (Help | Show Log in ...) -- it may have additional details.

0
Comment actions Permalink

Sorry am a bit slow, am somewhat new to PHP, phpStorm8... 4 years but never had a job on it...mostly as a hobby
Am a Cobol Programmer....Very different from php

Am on the latest version of PhpStorm8 (8.0.2), Got it about 2weeks ago, Platform is Windows8.1(about 3 weeks old), rebuild my PC after it died

So am running everything on my localhost, am using XAMPP, apache2.4, php5, mySQL

Just deleted all my logs, figure I start from scratch... did a Invalidate cache/restart, and open my phpStorm Project to see if error still there


Ok I think I got the log files u requested, also attached a small snapshot of the screen with error and without,

to make the error go away i just truncated the file over and over till the error goes away, till a point where if I add "$a =5;" the error reappears


Thanks for looking:), 3am, time for bed soon



Attachment(s):
idea.log.zip
threadDump-20150107-021935.txt.zip
screenshot2.png
screenshot.png
0
Comment actions Permalink

Unfortunately I'm unable to make anything out of this info.

I may only suggest:

1) See if temporarily going back to 8.0.1 (or trying 8.0.3 EAP build) will resolve the issue. There was some unexpected issue in 8.0.2 (WI-25857, WI-25865) where IDE is having issues with analysing deeply nested function/metod calls -- maybe it's related.

2) Submit a ticket with all this info (thread dumps, logs, source file (you can make it visible to "idea-developers" only) to the Issue Tracker.

0
Comment actions Permalink

Thanks anyways, I am still playing with my code, Clean the hell out of it just to see if it's my fault, simplified ... am new to php after all
I might get lucky


At the moment I am looking at..hmm example:

Class TableA();
Class TableB();
Class TableC();

If ($x = "A")
    $myObj = new TableA();
elseif ($x = "B"
    $myObj = new TableB();
elseif ($x = "C")

    $myObj = new TableC();
....


$c = $myObj->getRecordDate();//Exists in all Table classes



When I am not getting the method not defined error. I noticed that sometimes when i place the crtl+mouse-hover over the object name I get a SINGLE Class name for that object, BUT sometimes I get ALL the class names(multiple implementations)... again, Sometimes only

I have a feeling it is because I am creating too many objects, my Script works fine, I am just curious as to why i get "Method not found in the class". Might just tryin to break this big file into smaller ones

Anyways, thanks for trying Andriy

0

Please sign in to leave a comment.