developped with Symfony 5.2
- PHP ( version >= 7.2.5 )
- Database :
- mariadb ( version >= 10.2 )
or - mysql ( version >= 5.7 )
- mariadb ( version >= 10.2 )
- composer ( version : >= 2 )
more infos : symfony documentation
- doctrine/doctrine-migrations-bundle : "^3.1"
- phpdocumentor/reflection-docblock : "^5.2"
- lexik/jwt-authentication-bundle : "^2.11"
- sensio/framework-extra-bundle : "^6.1"
- symfony/proxy-manager-bridge : "5.2.*"
- liip/test-fixtures-bundle : "^1.11"
- symfony/framework-bundle : "5.2.*"
- doctrine/doctrine-bundle : "^2.3"
- nelmio/api-doc-bundle : "^3.0"
- doctrine/annotations : "^1.13"
- symfony/serializer : "5.2.*"
- symfony/validator : "5.2.*"
- doctrine/orm : "^2.8"
git clone https://github.com/LFZDavid/BileMo.git
cd Bilemo/ composer install
- set database connection in
.env
file# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
Make sure your local server is running
and use de command :composer init-db
It's a shortcut for :
php bin/console d:d:d --if-exists --force php bin/console d:d:c php bin/console d:m:m -n
Demo data will be installed with the last migration file
- Generate SSH key for LexikJWTAuthenticationBundle with the command :
php bin/console lexik:jwt:generate-keypair
- (optional) Fixtures for test/dev
composer init-db-dev
-
Set :
Content-Type: application/json
in all your request Header -
Get token :
send aPOST
request toapi/#_check
with thisJSON
parameter in the body{ "username":"SupplierDemo", "password":"pwddemo" }
This will returns you an unique (temporary) token
-
Add token to Header :
Authorization :Bearer token
- Access documentation :
- With your web browser, go to :
/api/doc
- or send a GET request to :
/api/doc.json
- With your web browser, go to :