What things you need to install the software and how to install them.
- PHP 7.4.0 (or higher)
- composer
- mysql 5.7 (or higher)
- Elastic 7.6.0 (or higher)
Another alternative via docker:
Run docker and connect to container
docker-compose build docker-compose up -d docker-compose exec php sh
Run the command below:
git clone https://github.com/oussama-aitmi/management cd management composer install (if you not using docker then run the local server) php -S localhost:8000 -t public or (symfony server:start)
To initialize the database, set the DATABASE_URL variable in the .env file with your database server URL:
DATABASE_URL=mysql://root:root@mysql:3306/symfony?serverVersion=5.7
then run the following commands:
php bin/console doctrine:database:create php bin/console doctrine:migrations:migrate
The project comes with a data fixture for all entitities, to execute them, run the following line command:
php bin/console doctrine:fixtures:load
Execute TestUnit:
./vendor/bin/phpunit tests/
{ "email":"email", "firstName":"firstName", "password": "password", "confirm_password": "password" }
HTTP/1.1 201 Content-Type: application/json { "token": "token" }
{ "email":"[email protected]", "password": "management" }
HTTP/1.1 200 Content-Type: application/json { "token":"token" }
...