$ git clone git@github.com:denbad/quotation.git quotation
$ cd quotation
$ docker-compose up -d --build
$ docker exec -it quotation-cli php -v
$ docker exec -it quotation-db mysql -u root -proot -e "SHOW VARIABLES LIKE '%version%'"
$ docker exec -it quotation-db-test mysql -u root -ptest -e "SHOW VARIABLES LIKE '%version%'"
$ curl -I http://localhost:8000/
$ docker exec -it quotation-cli composer install
$ docker exec -it quotation-cli php bin/console doctrine:migrations:migrate
$ docker exec -it quotation-cli php bin/console doctrine:migrations:migrate --env=test
$ docker exec -it quotation-cli php bin/phpunit --testsuite unit
$ docker exec -it quotation-cli php bin/phpunit --testsuite command
$ docker exec -it quotation-cli php bin/console quotation:sync --force --env=test && docker exec -it quotation-cli php bin/phpunit --testsuite controller
$ docker exec -it quotation-cli php vendor/bin/php-cs-fixer fix --dry-run --verbose --config=.php_cs.dist App tests
$ docker exec -it quotation-cli vendor/bin/phpstan analyse --level max -c phpstan.neon App tests
$ docker exec -it quotation-cli php bin/console quotation:sync --dry-run
$ docker exec -it quotation-cli php bin/console quotation:sync
$ docker exec -it quotation-cli php bin/console quotation:sync --force
Set default loader in config/packages/app.yaml ('ecb', 'cbr'), or pass manually:
$ docker exec -it quotation-cli php bin/console quotation:sync --loader=cbr
$ docker exec -it quotation-cli php bin/console quotation:sync --loader=ecb
$ docker exec -it quotation-db mysql -u root -proot -e "SELECT * FROM app.quotation ORDER BY id"
$ docker exec -it quotation-db-test mysql -u root -ptest -e "SELECT * FROM app.quotation ORDER BY id"
$ curl http://localhost:8000/convert/eurusd/
$ curl http://localhost:8000/convert/eurusd/?nominal=aaa
$ curl http://localhost:8000/convert/xxxzzz/?nominal=10
$ curl http://localhost:8000/convert/eurrub/?nominal=10