danbettles / php-project-template
v2.0.0
2024-11-03 09:45 UTC
Requires
- php: ^8.3
Requires (Dev)
- danbettles/codesniffer-standard: ^2.0
- phpstan/phpstan: ^1.12.7
- phpunit/phpunit: ^11.4.3
- squizlabs/php_codesniffer: ^3.10.3
README
A most basic PHP project template with PHPUnit, PHPStan, and PHP_CodeSniffer ready to roll. The project will be ISC-licensed by default.
Additionally, the following Composer scripts are included to help you quickly get going.
composer app:dev:test
: runs the PHPUnit unit testscomposer app:dev:analyse
: runs PHPStan at level 11composer app:dev:lint
: runs PHP_CodeSniffercomposer app:dev:check-quality
: runs the PHPUnit unit tests, PHPStan, and then PHP_CodeSniffer
Instructions
Run composer create-project danbettles/php-project-template <path>
— substituting <path>
with the pathname of the directory you'd like created — and then:
- Replace "php-project-template" with the name of your Git repository
- Replace "PHP Project Template" with the name of your project
- Except in
phpcs.xml
, replace "DanBettles" with your vendor namespace - Replace "PhpProjectTemplate" with the namespace of your app
- In
composer.json
, update the type of the package — if need be - Update the year and name in
LICENSE
- Rewrite this file
- Run
composer update
- Start building from
tests/SomethingTest.php
andsrc/Something.php