This scaffold comes with severals tools that work with docker under the hood.
php
: a PHP 7.1 executablephpspec
: a PHP test frameworkcomposer
: a PHP dependencies manager
Run
./php-env [command]
to use a tool.
See scripts/
for build/test scripts wrapper in docker.
The first time you use this scaffold you need to install all dependencies.
This is done by using the PHP dependencies manager: composer.
The following command should install all the dependencies in the /vendor
directory.
./php-env composer install
Sometimes you need to update your dependencies or add a new one. As an example, we will add a second PHP unit test framework called: phpunit.
./php-env composer require phpunit/phpunit ^6.2
That's it! You can now use your favorite tools!
phpspec is a tool which can help you write clean and working PHP code using behaviour driven development. Run the following command to execute tests:
./php-env phpspec run
phpspec provides a tool to help you writing specification.
You can use it with the desc
subcommand:
./php-env phpspec desc [MyNewNamespace]/[MyNewClass]
./php-env php app.php