danbettles / php-project-template
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
pkg:composer/danbettles/php-project-template
Requires
- php: ^8.3
Requires (Dev)
- danbettles/codesniffer-standard: ^3.0.0
- phpstan/phpstan: ^2.1.33
- phpunit/phpunit: ^12.5.4
- squizlabs/php_codesniffer: ^4.0.1
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 the following to create the skeleton of your new project.
composer create-project danbettles/php-project-template <dir-to-create>
Important
Replace <dir-to-create> with the actual path of the directory to create
In the new project:
- In
composer.json:- Update
name - If need be, update
description - Check/update
type - Update
authors
- Update
- Except in
phpcs.xml, replace "DanBettles"—match case, match whole word—with your vendor namespace - Replace "PhpProjectTemplate"—match case, match whole word—with the namespace of your app
- Run
composer update - Update the year and name in
LICENSE - Rewrite this file
- Start building from
tests/SomethingTest.phpandsrc/Something.php