Create migration
docker-compose exec php-fpm vendor/bin/doctrine-migrations migrations:diff --configuration=config/migrations.php
Execute migrations
docker-compose exec php-fpm vendor/bin/doctrine-migrations migrations:migrate --configuration=config/migrations.php
Tests
docker-compose run --rm phpunit
or
docker-compose run --rm phpunit vendor/bin/phpunit --coverage-html=storage/coverage
Requirements
- Docker 18.06.0+
- Docker-compose 1.25+
Automatic installation
docker-compose build && docker-compose run --rm composer && docker-compose up
Manual installation
- Copy docker-compose.override.yml.dist to docker-compose.override.yml
- Copy .env.example to .env
- Install composer dependencies (composer install)
- Run migrations
docker-compose exec php-fpm vendor/bin/doctrine-migrations migrations:migrate --configuration=config/migrations.php
Routes
GET /api/v1/products
All products listPOST /api/v1/products/create
Create fake productsPOST /api/v1/orders
POST body = [1,2,3]
Create orderPOST /api/v1/orders/pay
POST body {"id": 1,"sum": 9.99}
Pay order
Code coverage report (100%)
/storage/coverage