0
votes

I've written my own small PHP framework to provide a boilerplate for handling data management / cronjobs etc. across multiple of my personal web projects. The number of those was manageable and I would simply update changes to my framework for each project individually, but this number is growing and I recently had to deal with lots of clutter due to some reworks to my framework, so I decided that I wanted to centralize all this.

I'm working with PhpStorm and learnt that it provided the use of multiple content roots for each project, so I assumed that - although not very elegant - I could simply put the bare framework in its own directory and include it as a content root to every one of my web projects. After doing so though, I stumbled over issues with the deployment... it seems that you can define a remote host to only one of your content roots, with the other having its deployment menu entry greyed out. There's no way I can configure it as well, the deployment configuration is always referring to the "main" content root. I actually hoped that I could have both content roots uploaded in succession to the same host into the same deployment path.

Why is it greyed out? Is there even a way to achieve a merged deployment? Or is there maybe even a more elegant solution to my framework problem?

1
Works just fine for me (main project goes to root folder (/) + additional content root that goes into /extra folder -- paths are relative to deployment/user root). I can then right click on such additional content root and use Deployment | Sync with Deployed... from there. Deployment entry of Plain FTP type if that matters. Please provide more details/screenshots with your setup. - LazyOne
Already found the issue, check my answer. It came to me when I had to re-add the mapping for my project, which for some reason keeps deleting itself every now and then. - StrikeAgainst

1 Answers

0
votes

I just found out the issue myself, you obviously have to make sure that your deployment host has a mapping defined for each content root on its own, which I have totally overlooked all the time. In my case, where framework and web project share their main path, it looks like this:

enter image description here