Overlapping projects - is this ok in PHPStorm / Webstorm?

Is it ok to have overlapping projects in PHPStorm?


Project 1:  /Applications/MAMP/htdocs

Project 2: /Applications/MAMP/htdocs/project1usesEXTJS

project 3: /Applications/MAMP/htdocs/project2usesjquery

Can all 3 folders be a 'project' in PHPStorm?
I ask becuase Project 2 and 3 are subfolders of Project 1.
It looks like every PHPStorm project creates a hidden .idea folder in the projects root folder.
So in the above case, I would have 3 hidden .idea folders, one in each.

Is it safe to assume the top most one is used, and .idea's below are ignored?

From a workflow perspective,
I have projects setup for project 2 and 3 which are each subparts of Project 1
when I am working on project 2 or 3, my assumption is that re-indexing in PHPStorm will be faster because there are fewer libraries/less code.
Then, only when I need to test and work on the whole project do I need to open the bigger scope up at project 1.
Also project 1 is useful in another way in that it encompasses everything in my MAMP install, so If I need to create a directory to try something out, I can just put it there and use the existing project from my recent projects list.

1 comment
Comment actions Permalink

Hi Jack,

Yes -- PhpStorm will use .idea subfolder from the most top folder. I personally had no problems when tried to do somehow similar thing back in September -- I had my "framework" (lets call it like that) in "library" subfolder of the main project (just do not forget to exclude other .idea subfolders from main project). It is not exactly your case, but still close.

But since then I have changed "myframework" quite a bit (added PHPUnit tests, other manual test files etc), so I have moved it away and converted into completely separate project. And in mysite.com project instead of including the actual code I just have symlink to the "myframework" code. Works fine right now.

I'm just unsure about your "Project 1" -- _if_ Project 2 & Project 3 will have the same named classes (which will work ok inside hem), then Project 1 they may not work (I'm talkingabout code completion, analysis etc).


Please sign in to leave a comment.