Files
wiosna-dev_common-library/docs/Development.md

2.0 KiB
Raw Blame History

Meritoo Common Library

Development-related information

Requirements

  • Docker
  • Your favourite IDE :)

Getting started

  1. Build, create and start Docker's containers by running command:

    docker-compose up -d
    
  2. Install packages by running command:

    docker-compose run composer install
    

What is Docker?

Composer

Available as composer service. You can run any Composer's command using the composer service:

docker-compose run composer <command>

Examples below.

Install packages
docker-compose run composer install
Update packages
docker-compose run composer update
Add package
docker-compose run composer require <vendor>/<package>
Remove package
docker-compose run composer remove <vendor>/<package>

Coding Standards Fixer

Fix coding standard by running command:

docker-compose exec php-cli php-cs-fixer fix

Omit cache and run the Fixer from scratch by running command:

docker-compose exec php-cli rm .php_cs.cache && docker-compose exec php-cli php-cs-fixer fix

Want more?

Tests

Prerequisites

Install required packages by running command: docker-compose run composer install.

Running tests

Simply & quick, without code coverage

Tests are running using Docker and php-cli service defined in docker-compose.yml. Example:

docker-compose exec php-cli phpunit --no-coverage

You can also run them in container. In this case you have to run 2 commands:

  1. Enter container:

    docker-compose exec php-cli bash
    
  2. Run tests:

    phpunit --no-coverage
    

With code coverage

docker-compose exec php-cli phpunit

Other

Rebuild project and run tests by running command:

docker-compose exec php-cli phing

Back to Readme