koriym / php-skeleton
Generic PHP project skeleton package
Installs: 3 858
Dependents: 0
Suggesters: 0
Security: 0
Stars: 182
Watchers: 18
Forks: 27
Open Issues: 0
Requires
- php: ^8.0
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- composer/composer: ^2.0
- phpunit/phpunit: ^9.5
- 1.x-dev
- 1.2.0
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-alpha
- 0.9.0
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.1
- 0.8.0
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.2
- 0.6.1
- 0.5.1
- 0.5.0
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- dev-php81
This package is auto-updated.
Last update: 2024-12-18 05:40:01 UTC
README
Are you tired of copy-pasting your boilerplate PHP code whenever you need to start a new project?
This repository contains a single-line command that will automatically setup for you all the needed code to create a modern, clutter-free and test-oriented PHP package.
It will automatically install the following dependencies:
- PHPUnit: provides testing framework.
- PHP_CodeSniffer: detects violations of a defined set of coding standards.
- PHPMD: analyze your code to detect sub-optimal or overly complex code.
- PHPStan: discover bugs in your code without running it.
- Psalm: - another static analysis tool from Vimeo.
- PHPMetrics provides various metrics.
As well as config file for popular continuous integration tool.
Create Project
To create your project, enter the following command in your console.
composer create-project koriym/php-skeleton <project-path>
You will be asked a few questions to configure the project:
What is the vendor name ?
(MyVendor):Koriym
What is the package name ?
(MyPackage):AwesomePackage
What is your name ?
(Akihito Koriyama):
What is your email address ?
(akihito.koriyama@gmail.com):
Composer Commands
Once installed, the project will automatically be configured, so you can run those commands in the root of your application:
test
composer test
run phpunit
.
tests
composer tests
run cs
, sa
, and test
.
coverage, phpdbg, pcov
composer coverage
builds test coverage report. coverage
use XDebug, phpdbg
use phpdbg. pcov
use pcov.
cs, cs-fix
composer cs
checks coding standard. composer cs-fix
fix up the PHP code.
sa
composer sa
run static code analysis tools. (phpstan and psalm)
metrics
composer metrics
reports code metrics.
build
composer build
builds all reports.