Contributing
Pull requests are welcome on tomaj/nette-bootstrap-form. CONTRIBUTING.md is the project policy; this page matches it. Participation follows the code of conduct. Security vulnerabilities are reported in private, see the security policy.
Changes we can merge
- Follow PER Coding Style.
composer phpcscheckssrcandtests. - Add tests for every behaviour change. The rendering tests compare the HTML byte for byte with
tests/fixtures/<renderer>/<case>.html; a change in the output updates the fixture in the same pull request and is described in the changelog. - Document behaviour changes in
README.md, these pages andCHANGELOG.md. - Semantic Versioning: a different HTML output for an existing form is a breaking change and waits for the next major version.
- One pull request per change, from a feature branch.
Checks
composer install
composer check # code style, PHPStan, Rector, tests
composer coverage # HTML and Clover coverage in build/ (Xdebug or PCOV)
composer infection # mutation testingCI runs the tests on PHP 8.4 (also with the lowest dependencies), 8.5 and 8.6, plus a nightly PHP 8.7 that may fail. PHP 8.6 also checks the statement coverage and runs Infection.
Documentation
The site is built with VitePress from docs/:
cd docs
npm ci
npm run docs:dev # local preview
npm run docs:links # build and check every linkEvery php code block in these pages, README.md and UPGRADE-3.0.md is run by tests/DocsSnippetsTest.php in the PHPUnit suite. A block marked with <!-- snippet: skip --> is not run; an html block marked with <!-- snippet: output --> must match the output of the PHP block before it.
Releases
Maintainers publish releases by pushing a version tag, as described in RELEASING.md.