===================
This Application based on the php, nginx and sqlite as database engine.
This installation guide expects that you're using docker-compose.
For this just run following command:
docker-compose up -d --buildConnect to the php container container:
docker-compose exec php bashRun following command to generate SSH keys:
openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096
openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -puboutCopy passphrase and past it to your .env.local file
Create .env.local based on the .env file template.
Pass passphrase from the previous step to the JWT_PASSPHRASE variable.
- Open
/url to see the full list of available actions. - Register new user with
usernameandpasswordon the/api/registerroute. - Get JWT token for new user on the
/api/login_checkroute. - Pass the token to the Authorize section of the NelmioApiDoc.
- Enjoy.
Application has two types of tests:
- Unit
- Functional
vendor/bin/phpunit --testsuite UnitBefore this you need to create test DB as Functional tests use database.
bin/console doctrine:database:create -e test
bin/console doctrine:schema:create -e testFirst command creates database based on parameters from .env.test.
Second command creates schema.
Command to run function tests only:
vendor/bin/phpunit --testsuite Functionalmake cache-clear - Runs clear cache command
make cs-check - Runs PHP-CS-Fixer in dry run mode
make cs-fix - Runs PHP-CS-Fixer and fix all possible issues.
make - Shows available commands