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 you@example.com
Navigate to the Shopware Github Repository and click the "Fork"-Button in the upper right hand corner.
This will create a "copy" of the entire Shopware repository into your personal user namespace.
After the "forking action" has completed, clone your fork locally (this will create a shopware
directory):
git clone git@github.com:USERNAME/shopware.git
Add the shopware repository as upstream
remote:
cd shopware
git remote add upstream https://github.com/shopware/shopware.git
Verify the new remote named upstream
:
git remote -v
origin git@github.com:USERNAME/shopware.git (fetch)
origin git@github.com:USERNAME/shopware.git (push)
upstream https://github.com/shopware/shopware.git (fetch)
upstream https://github.com/shopware/shopware.git (push)
Now that you have the shopware source code locally on your machine please follow the Git Installation Instructions.
Each time you want to work on a patch, create a feature branch:
git fetch upstream
git checkout -b my-new-feature upstream/5.3
The first command will fetch the latest updates from the upstream project (shopware).
The second will create a new branch named my-new-feature
, that is based off the 5.3
-branch of the upstream
remote.
For most tests a configured database connection is required.
The tests are located in the tests/
directory
You can run the entire test suite with the following command:
vendor/bin/phpunit -c tests
If you want to test a single component, add its path after the phpunit command, e.g.:
vendor/bin/phpunit -c tests tests/Functional/Components/Api/
Push your branch to your github fork:
git push origin my-new-feature
Navigate back to the Shopware Github Repository and click the "Compare & pull request"-Button.
Before creating your pull request make sure that it fits our contribution guideline.