Best way to share settings in a team and allow individual ones?

I'm aware of

https://www.jetbrains.com/help/phpstorm/settings-tools-settings-repository.html

and

https://www.jetbrains.com/help/phpstorm/sharing-your-ide-settings.html

but I'm not yet sure if it's appropriate, the risk involved of loosing/overwriting setting, etc.

The goal is to share "certain settings" between team members so everyone is up to date, stuff like:

  • code style
  • php interpreter
  • phpunit
  • encoding
  • database connections?
  • remote path mappings

In my environment every dev uses the same vagrant setup, thus all these remote paths are (supposed) to be the same.

However it should be possible for certain things to still be adjusted by developers individually. Not necessarily codestyle :) but sometimes database or phpunit/remote interprter setting, without immediately propagating the changes to everyone.

There's also an idea to simply commit specific files from .idea , in fact we're doing this right now with the following files:

.idea/
  codeStyles/
    Project.xml
    codeStyleConfig.xml
  codeStyleSettings.xml
  phing.xml

We would like to add more but are uncertain about corruption or other problems. Candidates would be

.idea/encodings.xml
.idea/php-test-framework.xml
.idea/php.xml
.idea/remote-mappings.xml
.idea/vcs.xml

In at least .idea/php.xml I saw some path issues, e.g. `PhpInterpreters` use a strange path syntax to refer to the remote interpreter, e.g. `vagrant:///Users/user/src/vagrant-root/usr/bin/php`.

Any pointers?

thanks!

5 comments

Does the simple "File > Export / Import settings" feature work for you?

It is not ultra-granular but allows you to choose what portion of settings you would like to export/import.

 

Just in case, this is the option I am talking about:

https://www.jetbrains.com/help/phpstorm/exporting-and-importing-settings.html

0

Strange, I can't seem to find this option: ?

0

It's not there because you have IDE Settings Sync enabled, but it doesn't really matter as it doesn't cover your request anyways - it exports global settings, and you're asking about .idea contents.

So, how usually works - people elaborate a general configuration that more or less satisfies everyone, and then they add corresponding .idea contents to VCS.

Then, when a developer checks out the project, everything's configured for them. If they need to adjust settings, it makes sense to create a new changelist for config files, so that there were no conflicts during the next commit.

If, for instance, the VCS-based config was updated, it makes sence to pull the changes and then merge them with the custom ones (in the manual mode, unfortunately).

I hope this helps.

0

By saying "not satisfying" you mean something isn't covered? If not - please clarify.

0

Please sign in to leave a comment.