A skeleton for PHP library projects.
Copy over all files - except this readme - to your new PHP project and modify the following parts to your needs:
- composer.json:
- name
- description
- license if Apache-2.0 is not desired
- authors
- PHP namespace prefixes in autoload and autoload-dev
- build.xml
- phpcs-ruleset.xml
- [ruleset name][PHPCS ruleset name]
- .travis.yml
Run composer install
.
Put your classes in the src directory, and PHPUnit tests in the tests directory. Follow the PSR-4 conventions for autoloading and PSR-2 conventions for coding style.
Run a full test (lint check, coding standards check and unit tests) with
./vendor/bin/phing test
.
In order to automatically run a full test when committing to git, install the
included git hooks hook with ./vendor/bin/phing githooks
.
Register your project on: