

Web developer, Linux enthusiast, father and husband. I like to write about programming.
As a Magento developer, you are dealing with a complex code-base that you have to navigate through. That is why it is useful to have an IDE (Integrated Development Environment) that helps you write your code and ensure its quality.
Perhaps one of the most famous IDE for PHP developers is PHPStorm. PHPStorm comes out of the box with all the tools you need for writing PHP applications. Here are some tips and tricks about my PHPStorm configurations that I use as a Magento Developer on a daily basis.
I will not cover the following: keyboard shortcuts, fonts, and color schemes, since they will be different for everyone. Eventually I will share my settings.zip with you for download.
Go to the menu bar and hide what you don't need:
Show options menu
✔ Compact directories (Ensures less nesting of empty folders)
View > Appearance
Hide the following:
☐ Tool Window Bars
☐ Status Bar
☐ Navigation bar
Then go to Phpstorm -> Preferences or open "Preferences" with the key combination ⌘ + ,
☐ Animate windows
☐ Show tool window numbers
☐ Allow merging buttons on dialogs
☐ Show tool window bars
☐ Disable mnemonics in menu
☐ Reopen last project on startup
☐ Confirm application exit
✔ Open project in new window
☐ Show Breadcrumbs
☐ Enable Drag and Drop functionality in editor
☐ Show notification after reformat code action
✔ Ensure line feed at file end on save
Exclude files:
.github;.idea;generated;phpserver;pub;setup;update;var
This gives us a more organized folder structure with only the folders we care about.
I like to keep it as minimal as possible by only installing essential plugins, these are as follows:
⌘ +, Language & Framework -> PHP -> Quality tools -> PHP CodeSniffer -> …
<Magento_Root>/vendor/bin/phpcs
<Magento_Root>/vendor/bin/phpcbf
Repeat the same steps for Mess Detector and PHP CS Fixer. You can find these files under:
<Magento_Root>/vendor/bin/
And lastly, don't forget to backup your configuration by going to Files -> Manage IDE Settings -> Export Settings, you can download mine in here.
This is the end of my blog, if I missed something or you have any settings you want to share, please leave a comment below.
Previously behind paywall at: https://medium.com/dev-genius/the-complete-phpstorm-setup-for-magento-2-7776d4156c1e
Create your free account to unlock your custom reading experience.