This project was realized for my PHP/Symfony developer training at Openclassrooms.
To be sure that the project will install successfully, you need to have :
- PHP 8.1
- Composer 2.3.4
- Git
- Prefer a computer based on Unix OS (Linux or Macos)
- First, clone the project :
git clone [email protected]:davy-beauzil/p7-api.git
cd p7-api
-
Create
.env.local
file from.env
file and adapt your database configuration (DATABASE_URL
) -
Install composer dependencies
composer install
- Initialize database
php bin/console doctrine:database:create
php bin/console doctrine:schema:create
- Generate public and private keys for the LexikJWTAuthenticationBundle
php bin/console lexik:jwt:generate-keypair
php bin/console lexik:jwt:generate-keypair --env=test
- Load fixtures
php bin/console doctrine:fixtures:load
- You can now run this command and access to the documentation on http://localhost:8000/api/doc
symfony serve
You can run test with :
vendor/bin/phpunit