When submitting pull requests please follow the following guidelines:
There are a few QA tests which every commit has to pass. Please install the following Git hooks:
# from project root
cp config/pre-commit .git/hooks/
cp config/pre-push .git/hooks/
These hooks enforce coding style, code coverage, use of @covers annotation and checks for debug statements. On pre-commit
only coding style is enforced, on pre-push
everything has to pass.
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
Reference: How to Write a Git Commit Message by Chris Beams
- PHP is a dynamic language and that is great for many things
- BUT with great power comes great responsibility
- so please use type hints where ever possible
- functional methods (each, reduce, map, ...) are preferable to loops
Bump versions in
CHANGELOG.md
README.md
bin/dephpend
- test files
Then run:
# change these
VERSION="MAJOR.MINOR.PATCH"
COMMIT_EMAIL="[email protected]"
# copy & paste
[[ -z $(git status --porcelain) ]] && \
make phar && \
mv "build/dephpend.phar" "build/dephpend-$VERSION.phar" && \
gpg --local-user "${COMMIT_EMAIL}" --detach-sign --output "build/dephpend-${VERSION}.phar.asc" "build/dephpend-${VERSION}.phar" && \
gpg --verify "build/dephpend-${VERSION}.phar.asc" "build/dephpend-${VERSION}.phar" && \
bin/prepare-tag "${VERSION}" && \
git push && \
git push origin "${VERSION}"
Then upload to GitHub releases and verify via phive install dephpend
or phive update dephpend
.
The update the documentation
git checkout gh-pages && \
git merge --no-edit origin/main && \
make pages && \
git commit index.html -m "Update documentation" && \
git push && \
git checkout main