Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of .idea #13324

Closed
MorrisJobke opened this issue Jan 13, 2015 · 18 comments
Closed

Get rid of .idea #13324

MorrisJobke opened this issue Jan 13, 2015 · 18 comments

Comments

@MorrisJobke
Copy link
Contributor

It was a nice idea to ship the IDEs configuration inside of the repo, but I would vote for removing it and provide it in another way. You can simply import and export PHPStorms settings. Maybe provide them simply as download and don't mess with others config by default.

If this is approved I will prepare a PR.

cc @icewind1991 @nickvergessen @DeepDiver1975 @LukasReschke @butonic (you are the PHPStorm users I know)

@LukasReschke
Copy link
Member

I kinda like this current behaviour tbh - since we don't follow PSR we should have it very prominently placed. Any alternative idea?

@PVince81
Copy link
Contributor

Where is that config stored ?

Can PHPStorm by any chance export PHPCS + PHPMD config ?
I remember seeing such files in the "build" folder but they seem to be gone.

@MorrisJobke
Copy link
Contributor Author

From time to time I got changes in the idea folder. Sometime I change a setting and it got in there too....it's just annoying to either vanish settings or have a dirty git directory.

@PVince81 it's the .idea folder and it's a special XML file.

@LukasReschke
Copy link
Member

Okay. Sounds reasonable. Just saw that new IntelliJ version have some kind of autolearning anyways (adopting the style used in the file)

Fine for me then.

@nickvergessen
Copy link
Contributor

👍
We could add something like http://editorconfig.org/ (quite spread)

@MorrisJobke
Copy link
Contributor Author

We could add something like http://editorconfig.org/ (quite spread)

This sounds good 👍 It even has PHPStorm and Vim (I know @PVince81 uses vim and maybe @schiesbn )

And this would also help to get contributors to have a nice editor setting (even if they don't use IDEs and rather something like SublimeText)

@DeepDiver1975 DeepDiver1975 added this to the 8.1-next milestone Jan 15, 2015
@oparoz
Copy link
Contributor

oparoz commented Jan 19, 2015

+1 for EditorConfig

@MorrisJobke
Copy link
Contributor Author

I just had a look at editorconfig and ut just supports ~10 values. Nice idea, but the options for proper usage are simply missing. :(

@DeepDiver1975
Copy link
Member

I just had a look at editorconfig and ut just supports ~10 values. Nice idea, but the options for proper usage are simply missing. :(

let's have a look at this once 8.0 has left the building ....

@butonic
Copy link
Member

butonic commented Jan 20, 2015

what about adding .idea (and maybe netbeans and eclipse config folders) to gitignore while checking in a default config for our codestyle etc. That way when a user changes project settings you still have a clean workspace. In case you change one of our defaults you will get a dirty workspace, whick kind of makes sense, doesn't it?

In case of phpstorm we should obviosly check in .idea/codeStyleSettings.xml. Any others?

@DeepDiver1975
Copy link
Member

gentlemen - this is an issue we can talk about AFTER 8.0 - THX

@MorrisJobke
Copy link
Contributor Author

@butonic That is already the case. But as it is checked in also changes will be recognized. Now I enabled the "use short version of array()" functionality and it appears in the config. I don't want to check that into github, because then others maybe save some stuff for stable7 and break the code. I know that I have to look for this but it also saves me time when working on master - so I'm fine with the drawback.

@DeepDiver1975
Copy link
Member

Initially we did add the .idea folder on purpose - maybe not yet optimal.

JetBrains explain on what can/should be check in and what to be ignored
https://intellij-support.jetbrains.com/entries/23393067

Here is a detailed gitignore for the .idea folder: https://www.gitignore.io/api/phpstorm

maybe this helps ....

@nickvergessen
Copy link
Contributor

Well as per above, this can also be achieved by using something like http://editorconfig.org/
Since the last phpstorm update, I always get this change: https://gist.github.com/nickvergessen/d80ff81fd1530d210994

I wonder why this even happens, because we have .idea in the .gitignore, but somehow it does not correctly keep ignoring the file.

@MorrisJobke
Copy link
Contributor Author

I wonder why this even happens, because we have .idea in the .gitignore, but somehow it does not correctly keep ignoring the file.

Because it is a checked in file. Even if those are ignored: They are in the repository and changes are listed.

I get the same diff too.

@LEDfan
Copy link
Member

LEDfan commented Feb 14, 2015

Can't you change the name of the folder to idea, and when you start a PHPStorm project copy it to .idea. Next add the .idea to the gitignore? This way you have the default config always, and when it changes in your IDE settings, it isn't pushed.

@MorrisJobke
Copy link
Contributor Author

@LEDfan Then we don't even need to check that in. We could provide in on the wiki for example ;)

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants