INFO
Pravidlá prispievania sa vedú po anglicky, rovnako ako v repozitári. Časť o dokumentácii nižšie je po slovensky.
Contributing
Contributions are welcome and will be fully credited.
We accept contributions via Pull Requests on Github.
Pull Requests
PSR-2 Coding Standard - The easiest way to apply the conventions is to install PHP Code Sniffer.
Add tests! - Your patch won't be accepted if it doesn't have tests.
Document any change in behaviour - Make sure the
README.mdand any other relevant documentation are kept up-to-date.Consider our release cycle - We try to follow SemVer v2.0.0. Randomly breaking public APIs is not an option.
Create feature branches - Don't ask us to pull from your master branch.
One pull request per feature - If you want to do more than one thing, send multiple pull requests.
Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
Running Tests
$ composer testCoverage reports (build/logs/clover.xml, build/coverage/) are opt-in and need Xdebug:
$ composer coverageHappy coding!
Táto dokumentácia
Web je v docs/, postavený na VitePress, Node 22:
cd docs
npm ci
npm run docs:dev # http://localhost:5173/nette-api/
npm run docs:build
npm run docs:links # kontrola odkazov v zostavenom webe- Kód na stránkach príkladov pochádza z projektov v
examples/cez<<< @/../examples/...; meňte projekt, nie stránku. Každý projekt máe2e.sh, ktorý spúšťa CI. - Každá anglická stránka má slovenské dvojča v
docs/sk/;npm run checkzlyhá, keď niektoré chýba. - Diagramy sú Excalidraw súbory v
docs/diagrams/, vykreslené do svetlého a tmavého SVG ceznpm run diagrams. - Každý pull request dostane náhľad na
https://tomaj.github.io/nette-api/pr-preview/pr-<number>/.
Časté otázky
Ako spustím testy?
composer test spustí PHPUnit. composer coverage navyše zapíše reporty pokrytia do build/ (potrebuje Xdebug). Každý projekt príkladu má aj e2e.sh, pozrite si Príklady.
Musím so zmenou upraviť aj dokumentáciu?
Áno, zmena správania potrebuje upravenú dokumentáciu, po anglicky aj po slovensky.
Ako uvidím zmenu dokumentácie pred zlúčením?
Spustite npm run docs:dev v docs/, alebo otvorte náhľad, ktorý dostane každý pull request.