PhpStorm is a PHP IDE that many of the Shopware Developers use on a daily basis. You can find installation instructions on the official PhpStorm Website.
First of all you need a working Shopware installation. Just visit our Github Repository
and follow the README.md
installation instructions. You do not want to worry about a local webserver or database server?
Then take a look at our Vagrant and PHPStorm guide to set up a virtual
machine, ready to develop with Shopware. If you want to contribute to the Shopware repository also check out our
contribution guideline.
The Symfony Plugin for PhpStorm adds Shopware specific features like code completion, quick fixes and navigations. For an complete guide how to install, configure and use the plugin please read the following article: Shopware development with PhpStorm.
Special thanks go to Daniel Espendiller (@BigHaehnchen on Twitter) who wrote and maintains this plugin.
As mentioned in our coding standards, you should follow the PSR-1 and PSR-2 coding standards.
PhpStorm provides you with predefined settings:
File | Settings
for Windows and Linux or PhpStorm | Preferences
for OS XEditor | Code Style | PHP
Set from...
Predefined Style | PSR1/PSR2
PhpStorm provides you with a variant of automatic code completions. First, PhpStorm needs to index all files inside your Project. This might take a while, depending on the number and size of files in your project.
To exclude directories from indexing, open the Settings and select Directories in the left sidebar. You can now select directories on the right side and mark them as excluded by clicking on Excluded above.
From the context menu Mark directory as
-> Excluded
files
media
recovery
snippets
var/
(Do not exclude directory var/cache/production_DATE/doctrine
to allow PhpStorm to autocomplete getter and setter of attributes. E.g. $article->getAttribute()->getAttr4())web/cache/
Mark directory as
-> Sources Root
engine/Shopware/
engine/Library/Enlight/
Mark directory as
-> Test Sources Root
tests/Unit/
tests/Functional/