PhpStorm IDE configuration
This is my global configuration for PhpStorm, my favorite IDE for PHP. I have some custom configuration for code styling, inspections and file templates, and I use Git to track these configuration files and to synchronize them between workstations. The code style rules are based on PSR-1, PSR-2 and PSR-12 but I also added some things that are not specified in the PSR guidelines.
Feel free to use or fork this repository. Note that I normally stay up-to-date with the latest PhpStorm version, and I cannot guarantee that this works with older versions.
Some configuration is specifically for the Php Inspections (EA Extended) plugin. I guess this is ignored when you don't have the plugin.
Code style settings overview
| Language | Standards |
|---|---|
| PHP | PSR-2, PSR-12 |
| HTML / Twig | 4 spaces |
| CSS / SCSS / LESS | 2 spaces |
| Yaml | 2 spaces |
Installation
Before you do this, make sure PhpStorm is not running, or it will overwrite the changed files before shutting down.
Use the following commands to go to the config directory, remove some default directories, and pull the files from my repository:
# replace with the actual directory name, depending on OS and PhpStorm version (see below).
cd ~/.config/JetBrains/PhpStorm2020.2
# remove the files and folders that are in this repository
rm -r codestyles/
rm -r fileTemplates/
rm -r inspection/
git init
git remote add origin git@github.com:nicwortel/phpstorm-ide-config.git
git fetch
git checkout -t origin/masterLocation of the config folder
| OS | Syntax | Example |
|---|---|---|
| Linux | ~/.config/JetBrains/<product><version> |
~/.config/JetBrains/PhpStorm2020.2 |
| macOS | ~/Library/Application Support/JetBrains/<product><version> |
~/Library/Application Support/JetBrains/PhpStorm2020.2 |
| Windows | %APPDATA%\JetBrains\<product><version> |
C:\Users\JohnS\AppData\Roaming\JetBrains\PhpStorm2020.2 |
See Default IDE directories for more information about the location of the configuration directory.
Subdirectories of the config folder
| Directory | Contents |
|---|---|
| codestyles | Code Style settings (Editor > Code Style) |
| colors | Colors & Fonts settings (Editor > Colors & Fonts) |
| fileTemplates | File and Code Templates (Editor > File and Code Templates) |
| filetypes | File Types (Editor > File Types) |
| inspection | Inspection profiles (Editor > Inspections) |
| keymaps | Keyboard shortcuts (Keymap) |
| templates | Live templates (Editor > Live Templates) |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
