This is a short HowTo, which will show you, how you could contribute code to Shopware. Please also have a look at our contribution guideline.
Set up your user information with your real name and a working email address:
git config --global user.name "Your Name"
git config --global user.email email@example.com
Navigate to the Shopware Platform Github Repository and click the "Fork"-Button in the upper right hand corner.
This will create a "copy" of the entire Shopware Platform repository into your personal user namespace.
Please follow the Git installation instructions.
You need an additional step after you cloned
Add your fork repository as
git remote add fork https://github.com/USERNAME/platform.git
Verify the new remote named
git remote -v origin https://github.com/shopware/platform.git (fetch) origin https://github.com/shopware/platform.git (push) fork firstname.lastname@example.org:USERNAME/platform.git (fetch) fork email@example.com:USERNAME/platform.git (push)
cd back into the development template and continue with the installation.
Each time you want to work on a patch, create a feature branch:
git fetch origin
git checkout -b my-new-feature origin/master
The first command will fetch the latest updates from the original project (shopware/platform).
The second will create a new branch named
my-new-feature, that is based off the
master-branch of the
The tests are located in different directories according to the domains they are testing. You can run the entire test suite with the following command from the development template:
Please also use the commands
./psh.phar fix-cs, to fix the code style according to our rules
./psh.phar static-analyze to run a static code analysis, which will check your code quality with help of PHPStan and Psalm.
Push your branch to your github fork:
git push fork my-new-feature
Navigate back to the Shopware Platform Github repository and click the "Compare & pull request"-Button.
Before creating your pull request make sure that it fits our contribution guideline.