Preskočiť na obsah

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.md and 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 ​

bash
$ composer test

Coverage reports (build/logs/clover.xml, build/coverage/) are opt-in and need Xdebug:

bash
$ composer coverage

Happy coding!

Táto dokumentácia ​

Web je v docs/, postavený na VitePress, Node 22:

bash
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 check zlyhá, keď niektoré chýba.
  • Diagramy sú Excalidraw súbory v docs/diagrams/, vykreslené do svetlého a tmavého SVG cez npm 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.

Vydané pod licenciou MIT.