Can't resolve target of expression....

Ok, so I have a require_once at the top of a php file bringing in my includes.

require_once("../includes/includes.php");


phpStorm is highlighting this and showing two issues.

Can't resolve target of expression '../includes/includes.php' when I check out the warning on require_once.

The second is Path '..' not found... when checking the warning highlighted on the ..

When the code is run the include.php is found and used.

I'm just trying to get a handle on why I'm getting a warning here!

Note the includes.php is in the project and phpStorm finds it when I'm typing it in, and as seen above the warning is just regarding the ..

Any insight into the reason for this warning would be greatly appreciated.

Note on the line below the one shown above I have a second include.

require_once("validate.php");


This does not show any warnings.

Any help for a relatively new php programmer and a new user of phpStorm would be most welcome.

O.

2 comments
Comment actions Permalink

Hi Richard,

It has to be a regression  in PhpStorm, as accordingly to this ticket is has been fixed long time ago:
http://youtrack.jetbrains.net/issue/WI-1753?projectKey=WI

If you hover of path elements with Ctrl pressed, you will see that PhpStorm actually resolves the file (if you Ctrl+Click it will open correct file) but does it incorrectly for a folders...

P.S.
I have created a new ticket -- please check it if you have similar circumstances/setup and add comments if you have any:
http://youtrack.jetbrains.net/issue/WI-6604?projectKey=WI

0
Comment actions Permalink

Thanks for the heads up and the creation of that rather detailed ticket!

I'm still getting used to both php and phpStorm so I didn't want to assume the issue was a bug.

I'll one up your ticket!

O.

0

Please sign in to leave a comment.