kreemers / template
Package template
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.2
Requires (Dev)
- doctrine/coding-standard: ^6.0
- infection/infection: ^0.13.1
- phpunit/phpunit: ^8.2
- squizlabs/php_codesniffer: ^3.4
- symfony/var-dumper: ^4.3
- vimeo/psalm: ^3.4
This package is auto-updated.
Last update: 2024-05-12 19:38:02 UTC
README
PHP Composer Package Template
This repository provides a skeleton for a Composer package.
Usage
Run composer create-project kreemers/template
Pre-Installed and configured features
- PHPUnit https://phpunit.de (with Scrutinizer Code Coverage)
- Psalm https://github.com/vimeo/psalm (Static Code Analysis)
- PHP_CodeSniffer https://github.com/squizlabs/PHP_CodeSniffer (with Doctrine Standard)
- Travis CI https://travis-ci.org
- Scrutinizer https://scrutinizer-ci.com
- Infection https://github.com/infection/infection (Mutation Testing Framework)
Composer Scripts
composer run test
Runs the tests in your development environment (CodeSniffer -> Psalm -> PHPUnit)
composer run fix
Runs the CodeFixer to automatically fix code style issues
composer run infection
Runs mutation tests
In a nutshell, it
- runs the test suite to see if all tests pass
- mutates the source code with a set of predefined mutators (mutation operators)
- for each Mutant (modified code with one change) it runs the tests that cover changed line
- analyzes whether the tests start to fail
- collects the results of killed, escaped Mutants, errors and timeouts
see: https://infection.github.io/guide/#What-is-Infection
composer run ci
Is for running the tests in a CI Environment (e.g. Travis CI) and create coverage reports