带有高质量工具的现代 PHP 包骨架
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:
After installation, your project will have the following structure:
…To create your project, enter the following command in your console:
composer create-project koriym/php-skeleton 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 ?
([email protected]):You can also skip the prompts by setting environment variables:
VENDOR=MyVendor PACKAGE=MyPackage composer create-project koriym/php-skeleton Once installed, the project will automatically be configured, so you can run these commands in the root of your application:
composer test runs phpunit.
composer tests runs cs, sa, and test.
composer coverage builds a test coverage report using XDebug.
composer phpdbg builds a test coverage report using phpdbg.
composer pcov builds a test coverage report using pcov.
composer mutation runs mutation testing using Infection.
composer cs checks coding standard.
composer cs-fix fixes the PHP code to match coding standards.
composer sa runs static code analysis tools (PHPStan and Psalm).
composer build builds all reports (code quality, test coverage, require check).
This project includes several GitHub Actions workflows to ensure code quality and compatibility:
These workflows are pre-configured for common PHP project needs, but feel free to modify or remove them to suit your project's requirements.
暂无开放 Issues,或尚未同步最近议题。