Generic PHP project skeleton package

1.2.0 2023-04-17 14:58 UTC


A standard PHP project skeleton

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 ?


What is the package name ?


What is your name ?

(Akihito Koriyama):

What is your email address ?


Composer Commands

Once installed, the project will automatically be configured, so you can run those commands in the root of your application:


composer test run phpunit.


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.


composer sa run static code analysis tools. (phpstan and psalm)


composer metrics reports code metrics.


composer build builds all reports.