Skip to content
Public template

About

No description, website, or topics provided.

Resources

Stars

90 stars

Watchers

12 watching

Forks

Repository files navigation

php-package

Github Actions Status

Prerequisites

  • Linux, Macos, WSL
  • mise, it installs PHP, Composer, mago and hk from mise.toml
  • Xdebug or PCOV (only for test coverage, mise does not provide them)
  • Make
  • Git

Addons

Use http://psysh.org/

Setup

Setup SSH before clone:

git clone git@github.com:hexlet-boilerplates/php-package.git
cd php-package

mise install
make install

make install also installs the git hooks: hk runs the checks before a commit and the tests before a push.

Run linter

make lint

See config mago.toml

Run tests

make test

Test Coverage

make test-coverage
# see ./build/logs/clover.xml
  • the set of files under coverage is declared in phpunit.xml
  • the threshold is COVERAGE_MIN in the Makefile — make test-coverage exits with an error below it, so the PHP CI badge stays green only while coverage holds
  • requires the Xdebug or PCOV extension, otherwise PHPUnit reports No code coverage driver available

Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.

About

No description, website, or topics provided.

Resources

Stars

90 stars

Watchers

12 watching

Forks

Used by

Contributors

Languages