===================
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 --build
Connect to the php container container:
docker-compose exec php bash
Run 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 -pubout
Copy 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
username
andpassword
on the/api/register
route. - Get JWT token for new user on the
/api/login_check
route. - Pass the token to the Authorize section of the NelmioApiDoc.
- Enjoy.
Application has two types of tests:
- Unit
- Functional
vendor/bin/phpunit --testsuite Unit
Before 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 test
First command creates database based on parameters from .env.test
.
Second command creates schema.
Command to run function tests only:
vendor/bin/phpunit --testsuite Functional
make 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