Phpstorm - extend class in another project Follow
I have two projects (a WordPress Parent Theme and a WordPress Child Theme). I'm using PSR-4 autoloading and in my Child Theme project I'm extending a class found in my Parent Theme project. This works, but Phpstorm complains about not finding the class. I don't want to suppress the error. The only solution I've found so far that works is under Settings -> Directories, I add the Parent Theme project directory to the Child Theme project. But I don't like this solution as I want to keep the two projects separate for various reasons (for one - it makes things clearer to have two separate Phpstorm windows open to the two different projects rather than to mix the two different project tabs in one Phpstorm window).
Is there a way to get Phpstorm to look in the Parent Theme project for indexing purposes when I'm working in the Child Theme project? Similar to how you can point Phpstorm at a local copy of a WordPress installation so that it doesn't complain about unknown WordPress functions?
Please sign in to leave a comment.
Settings/Preferences | PHP --> Include Path
Thanks! This fixed my problem.