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!

2
7 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

PS: old thread of mine https://intellij-support.jetbrains.com/hc/en-us/community/posts/207015885-How-to-properly-share-various-settings-in-a-team- 🤷‍♀️

I think by and large the answers are still not satisfying.

 

1

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

0

Some issues we have when sharing settings within a team:
- No easy updates to local settings when central settings are updated.
- separate settings for each existing (cloned) project with no easy way to mass-update all existing projects.
- a lot seems possible but it requires us to hack around and into all the various files and folders in each .idea folder of each project.

To give one specific example: we’d like all users to use the same inspection profile for all projects. We have found no way to update a central inspection profile and have all users use these new settings without further action from each individual user, and hence no way to enforce these inspections.

0

At this moment, the team responsible for the settings sharing feature is mainly focused on a new Settings Sync plugin. Sadly, it does not support group settings sharing yet and currently, it is designed for single users. However, there is a corresponding feature request to make it suitable for teams:
https://youtrack.jetbrains.com/issue/IDEA-309002/Make-Settings-Sync-new-separate-feature-suitable-for-team-settings-sharing 

0

Please sign in to leave a comment.