If you find a bug, or any mistake, please, commit a fix or send a report: https://github.com/pedroac/url4php/issues
- Never send commits to the master branch.
- Create a branch, eg:
feature/foo
orfix/bar
. - Send pull requests.
- Send one pull request for each feature.
- Commit messages must be imperative: "Create...", "Change...", etc.
- Always run all the PHPUnit tests before pushing the code to the repository.
- Implement PHPUnit tests for new features and bug fixes.
Execute from the library root:
vendor/phpunit/phpunit/phpunit --coverage-html coverage
Open coverage/index.html
in a web browser to check code coverage.
- Follow the semver conventions: http://semver.org.
- Follow the PHPDoc conventions: https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md.
- Add the
@since
directive to the introduced classes and functions. - Make sure the README.md and the documentation is kept-updated.
- Methods descriptions must be imperative and describing expectations, like a contract: "Create...", "Change...", "... should ...", etc.
Execute from the library root:
vendor/phpdocumentor/phpdocumentor/bin/phpdoc -d src/ -t docs/ --visibility=public --title="pedroac's URL library API Documentation"
- Use the PHP Code Sniffer, or a similar tool, to follow the PSR-2 Coding Standard.
- Use the PHP Mess Detector to keep the code clean.
- Keep the code readable and simple.