A generator for Yeoman to generate boilerplate for a PHP library with support for PHPUnit
MIT License
A generator for Yeoman to generate boilerplate for a PHP library with support for PHPUnit.
npm install -g yo
npm install -g generator-php-library
yo php-library
The generator will automatically create the following boilerplate for you:
/src
folder structure for your PHP code/tests
folder structure for your PHPUnit unit testsphpunit.xml
and Bootstrap.php
file for PHPUnitSampleTest.php
composer.json
with autoloader support for your librarypackage.json
with the right dependencies to lint and unit test your codeGruntfile.js
with the configuration to lint and unit test your codeAdd your library classes in the namespaced directories in the /src
directory.
Add your unit tests in the namespaced directories in the /tests
directory.
Run grunt
to lint your PHP code and run your unit tests:
grunt
.gitignore