Skip to content
CI ready PHP project skeleton
Branch: 1.x
Clone or download
Latest commit e323d29 Jan 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests fix cs Dec 28, 2018
.gitignore
.php_cs.dist update php._cs Dec 28, 2018
.scrutinizer.yml remove duplicated key Dec 28, 2018
.travis.yml remove apc install Jan 14, 2019
LICENSE license name and year Mar 5, 2016
README.md add travis badge Jan 14, 2019
composer.json
phpcs.xml
phpmd.xml set meta file's xml schema Jan 14, 2019
phpstan.neon add phpstan Apr 4, 2018
phpunit.xml.dist set meta file's xml schema Jan 14, 2019

README.md

A standard PHP project skeleton

Build Status

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 6.x: run your unit tests.
  • PHP_CodeSniffer: validate your code against code convention.
  • PHP CS Fixer: automatically fix your code to match the code convention.
  • PHPMD: analyze your code to detect sub-optimal or overly complex code.
  • PHPStan: analyze your code without running it to find bugs even before you write tests for the code.

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 phpcs, php-cs-fixer, phpmd, phpstan and phpunit.

coverage

composer coverage builds test coverage report.

cs-fix

composer cs-fix run php-cs-fixer and phpcbf to fix up the PHP code to follow the coding standards. (Check only command compposer cs is also available.)

Setup continuous integration

You can’t perform that action at this time.