2017 © Pedro Peláez
 

library php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

image

cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  • Friday, October 3, 2014
  • by cpliakas
  • Repository
  • 8 Watchers
  • 76 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 16 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

PHP Project Starter

Build Status Code Coverage HHVM Status Scrutinizer Code Quality Latest Stable Version License, (*1)

PHP Project Starter is a command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools. The goals of this application are to guide developers towards best practices and get them from zero-to-CI in seconds., (*2)

The applications created by this tool have an opinionated directory structure, build system, and pre-configured set of service connections with badges ready to go. Refer to the Tools And Conventions and Directory Structure sections below for more details., (*3)

See the examples below for repositories created by the PHP Project Starter tool:, (*4)

Usage

Install The Command Line Tool

Download Via Browser

Download php-project.phar from https://github.com/cpliakas/php-project-starter/releases/latest,, (*5)

Download Via Command Line

curl -O http://www.chrispliakas.com/php-project-starter/download/latest/php-project.phar, (*6)

Test It Out!

Run php php-project.phar --help to see all options supported by the command line tool and ensure that installation succeeded., (*7)

It is also common practice to place the php-project.phar file in a location that makes it easier to access, for example /usr/local/bin, and renaming it to php-project. Ensure the file is executable by running chmod 755 so that you don't have to prefix the command with php., (*8)

Create A New Project

php php-project.phar new \
  --label="My Project" \
  --description="A longer description for My Project" \
  --namespace="My\Project" \
  cpliakas/my-project

Pass the --jenkins-url option to post a job to Jenkins that consumes the build artifacts., (*9)

Make A Repository On GitHub

Make a new repository matching the project name (e.g. cpliakas/my-project) and push your code. Note that the origin remote is already set in the repository., (*10)

cd ../path/to/working-copy
git push -u origin master

Configure Other Services

Keeping Up-To-Date

Run the following command to update PHP Project Starter to the latest stable version:, (*11)

php php-project.phar self-update, (*12)

Using Apache Ant

Running ant in the newly created project's root directory will download Composer, install development dependencies, run PHPUnit, and generate a code coverage report and software metrics in the ./build directory., (*13)

The main targets can be found by running ant -p and are listed below:, (*14)

  • clean: Cleanup build artifacts
  • clean-src: Cleanup dependency source code
  • clean-all: Cleanup build artifacts and dependency source code
  • composer: Run composer update
  • lint: Perform syntax check of sourcecode files
  • pdepend: Calculate software metrics using PHP_Depend
  • phpcpd: Find duplicate code using PHPCPD
  • phploc: Measure project size using PHPLOC
  • phpmd: Perform mess detection using PHPMD, print human readable output.
  • phpmd-ci: Perform mess detection using PHPMD, creating a log file for the CI server
  • phpunit: Run unit tests with PHPUnit

Common command line options that set Ant properties are listed below:, (*15)

  • -Dcomposer.noselfupdate=1: Do not run composer self-update during the build
  • -Dcomposer.noupdate=1: Do not run composer update during the build

Tools And Conventions

Tools and conventions that this template expects the PHP project being started to embrace., (*16)

Dependency Management

Build & CI

Code Quality

Services

Conventions

Directory Structure

PHP Project

.
|-- src/
|-- test/
|-- .editorconfig
|-- .gitignore
|-- .scrutinizer.yml
|-- .travis.yml
|-- build.xml
|-- composer.json
|-- phpmd.xml
|-- phpunit.xml
|-- LICENSE
`-- README.md

Build Artifacts

``` . -- build/ |-- coverage/ |--index.html |-- logs/ | |-- clover.xml | |-- jdepend.xml | |-- junit.xml | |-- phploc.csv | |-- pmd-cpd.xml | -- pmd.xml |-- pdepend/ | |-- dependencies.svg |-- overview-pyramid.svg `-- composer.phar, (*17)

The Versions

03/10 2014

dev-master

9999999-dev https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

02/10 2014

0.3.4

0.3.4.0 https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

02/10 2014

0.3.3

0.3.3.0 https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

01/10 2014

0.3.2

0.3.2.0 https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

30/09 2014

0.3.1

0.3.1.0 https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

30/09 2014

0.3.0

0.3.0.0 https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

14/03 2014

0.2.8

0.2.8.0 https://github.com/cpliakas/php-project-starter

A command line tool that allows developers to quickly create PHP applications that use common conventions and best-in-breed development tools.

  Sources   Download

MIT

The Requires

 

by Chris Pliakas

php

27/12 2013

0.2.7

0.2.7.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

by Chris Pliakas

php

24/12 2013

0.2.6

0.2.6.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

by Chris Pliakas

php

06/12 2013

0.2.5

0.2.5.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

by Chris Pliakas

php

25/11 2013

0.2.4

0.2.4.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

by Chris Pliakas

php

24/11 2013

0.2.3

0.2.3.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

by Chris Pliakas

php

20/11 2013

0.2.2

0.2.2.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

20/11 2013

0.2.1

0.2.1.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

19/11 2013

0.2.0

0.2.0.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

14/11 2013

0.1.1

0.1.1.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php

14/11 2013

0.1.0

0.1.0.0 https://github.com/cpliakas/php-project-starter

An opinionated template and CLI application that makes it easy to start a PHP project using best practice tools and conventions.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Pliakas

php