sokil / php-library-starter-kit
Starter kit for creating composer compatible library
Requires
- php: ^7.3
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0
- php-coveralls/php-coveralls: ^2.2.0
- phpmd/phpmd: @stable
- phpunit/phpunit: ^8.4.3
- slevomat/coding-standard: ^5.0
- squizlabs/php_codesniffer: ^3.5.2
Suggests
- infection/infection: AST based PHP Mutation Testing Framework
- phpbench/phpbench: PHPBench is a benchmarking framework for PHP
This package is auto-updated.
Last update: 2024-11-13 06:02:21 UTC
README
Starter kit for creating composer compatible library will help to add boilerplate code. Clone project and start library development with already configured tests, code coverage, code style and quality tools, betchmarking and CI.
Creating new project
Begin your new library with starter kit. Just create project:
composer create-project sokil/php-library-starter-kit my-php-library --prefer-source
Or you can just clone repo:
git clone https://github.com/sokil/php-library-starter-kit.git my-php-library
Composer commands
- "test": start unit tests
- "cover": generate code coverage report to file
- "coveralls": send code coverage report to
coveralls
- "check-style": check code style by PSR2 rules
- "fix-style": automatically fix style by PSR2 rules
- "bench": run
phpbench
benchmarks, - "infection": run mutation tests
External tools
There are some usefull tools for library development, but they written on PHP > 7.0 and this library by default configured for PHP ">=5.3 || ^7.0". So this tools only suggested to be installed or may be installed globally as phar packages or global composer requirement.
PHPBench
Read more at http://phpbench.readthedocs.io. There is some configuration in phpbench.json
. Also there is composer script to run infection: composer bench
Infection
Read more at https://infection.github.io. There is some configuration in infection.json.dist
. Also there is composer script to run infection: composer infection