Managing related projects with PhpStorm

Hi,

I'm new to PhpStorm and have been searching the web for a solution to my problem, but to avail, I hope somebody here can help me out.

My setting is this: I have a lot of different projects and all of them are using are using external libraries, one being Zend Framework and a framework I did myself (let's call it "MyFramework").
So I have set up the projects in PhpStorm and added Zend Framework as well as MyFramework to the external libraries by configuring the include paths. All projects use CVS for version control.

Now ... "MyFramework" is a PhpStorm-project by itself (and also added to CVS), so now whenever I change a file in the "MyFramework"-project, I'd like the change to be visible in all other project that include MyFramework as an external library. Only that this does not work, changes in the MyFramework-files are not visible in the other projects (which use MyFramework as an external library) and the other way round, so I end up doing all changes twice which is very annoying.

Can PhpStorm be configured so that the MyFramework-project is somehow "linked" to another project (and maybe not added as an external library), so changes made to the MyFramework-project (while working on another project) will also be recognized and committed to CVS (and visible at the same time when editing the MyFramework-project)?

I hope I made myself clear :)
Any help is appreciated,
Dirk

4 comments

Hi there,

If I understood you correctly ... then instead adding it under External Libraries .. add it as separate Content Root: "Settings | Directories --> Add content root". In project tree it will be listed as part of the actual project and you can even setup separate VCS for it (your actual project is just a separate content root -- all you do here is adding another one)

Another possible idea (sorry, I do not have whole picture of your setup there) is to add symbolic link to your framework somewhere inside the actual project structure (I mean: "PROJECT_ROOT\libs\MyFramework" --> "my\real\location\for\MyFramework"). Obviously, it does not need to be added under External Libraries as well.

0

Hi Andriy,

thanks a lot! I wasn't aware of "Add content root" (got lost in the pile of config options :)), but this made it lot better. I'll have to update MyFramework through CVS if there were changes made to it using the other projects, but at least the changes are there and I won't be forced to edit them all over again.

Thanks again,
Dirk

0

I'll have to update MyFramework through CVS if there were changes made to it using the other projects, but at least the changes are there and I won't be forced to edit them all over again.

Sorry, but I do not understand this moment. Why via VCS? IF it is on the same computer, then why VCS is required?

Maybe PhpStorm simply does not see those changes? Does it sees them when you restart it (or close and reopen the project)? If so -- try "File | Synchronize" -- it will rescan local files for any possible changes.
0

You're perfectly right and got me on the right track: Synchronisation didn't help, I noticed that the MyFramework-project had the file-path in the window title looking like "C:\users\...\phpstorm_cvs\" (or similar) while all other projects had the correct path pointing directly to my local files. It seems that I created the MyFramework-project from CVS instead from my local files so any change made to the files outside of MyFramework never showed up in the actual project.

My bad, thanks for helping me out!
Kind regards,
Dirk

0

Please sign in to leave a comment.