- Fork this repository and clone it to your machine
- Try to conform to our code style
- You should make only one change in each branch
- Coverage % needs to be equal to or greater than that of the previous commit.
- When adding tests, keep the same namespace as source files.
- If you have added a file at
\MyParcelNL\Sdk\Model\MyNamespace
, with a method namedmyMethod
, you would create a test for this function in\MyParcelNL\Sdk\Test\Model\MyNamespace
and call the methodtestMyMethod
. If you're using a dataProvider it should be calledprovideTestMyMethodData
.
- If you have added a file at
If you haven't done so, prepare an .env
file:
cp .env.template .env
# .env
API_KEY_NL="<MyParcelNL API key>"
API_KEY_BE="<MyParcelBE API key>"
Run tests with the following command:
docker compose run --rm php
Create an HTML coverage report:
docker compose run --rm php --coverage-html coverage
You can use this to make sure your new or updated code has 100% coverage.
Enable XDebug:
docker compose run --rm -it php php -dxdebug.mode=debug vendor/bin/phpunit
Make as many commits as you'd like. We use Conventional Commits and semantic-release to simplify the process of releasing updates by automating release notes and changelogs based on the rules of @commitlint/config-conventional. Your branch will be squashed into one single valid commit.
- Keep your pull requests focused on single subjects
- Please explain what you changed and why
- We will review your code and thoroughly test it before squashing and merging your pull request