Purpose of this document is to describe how to set up and use the application in local environment
First you have to create a local copy of the .env.dist file:
$ cp .env.dist .envthen to define the environment variables according to your local environment, such as redis DNS, database url, etc. To see the full list of available environment variables please refer to the devops documentation.
The application uses JWT tokens for API authentication. You must generate your private/public keypair to make it work.
To generate private key:
$ openssl genpkey -out config/secrets/dev/jwt_private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096Make sure you update the JWT_PASSPHRASE environment variable in your .env.local file with the passphrase of your choice.
To generate public key:
$ openssl pkey -in config/secrets/dev/jwt_private.pem -out config/secrets/dev/jwt_public.pem -puboutTo run the application with Symfony's built-in web-server just launch:
$ bin/console server:startNote: If you want to run the application using your own web-server, please refer to Symfony's official documentation about web server configuration.
To install dependencies run:
$ composer installTo run the full test suite execute:
$ bin/phpunitIf you receive an error message about not finding the bootstrap files:
(bin/.phpunit/phpunit-8.3-0/vendor/composer/../symfony/phpunit-bridge/bootstrap.php): failed to open stream: No such file or directory ...)
try to delete the autogenerated phpunit folder:
$ rm -rf bin/.phpunitand execute the command again.
To run infection suite execute:
$ vendor/bin/infection --threads=$(nproc)If you receive an error message about not finding the bootstrap files:
(bin/.phpunit/phpunit-8.3-0/vendor/composer/../symfony/phpunit-bridge/bootstrap.php): failed to open stream: No such file or directory ...)
try to delete the autogenerated phpunit folder:
$ rm -rf bin/.phpunitand execute the command again.