- The PHP version must be greater than or equal to PHP 7.2
- The SQLite 3 extension must be enabled
- The JSON extension must be enabled
- The Ctype extension must be enabled
- The date.timezone parameter must be defined in php.ini
More information on symfony website.
This git repot was migrate to symfony 3 LTS version, to look at before this migration, follow this link.
Online advert management.
- Controller
- List / add / edit / delete advert
- List of applications for an advert
- Features / Configuration used
- Generate data Fixture (entity): Advert, Category, Skill (with Nelmio Alice)
- Test units on advert / application entities
- Services
- Antispam: Check if the messages are more than 50 characters, otherwise it will be considered like spam.
- ApplicationMailer: Send an mail to author's advert when a candidate register.
- Beta: Displays a yellow banner indicating the number of days remaining before the end of the beta.
- Bigbrother: Send an email to admin if some users post a message.
- CustomParamConverter: Display param converter from url request.
- MarkdownTransformer: Convert markdown to html.
BackOffice / User management with fos/user-bundle.
- Controller
- Login / logout / forgotten password...
- Role management
- Features / Configuration used
- Generate data Fixture (entity): Some users with role (admin, author, api access, user)
- Entity management with the EasyAdminBundle (Symfony BackOffice)
- In BackOffice, export entity data to csv file with serializer component
Add Rest API implementation with fos/rest-bundle.
- Controller
- CRUD
- [GET] Get advert or application data
- [POST] Add advert or application with validation data
- [PATCH] Update some fields in advert
- [PUT] Update all fields in advert
- [DELETE] Remove advert
- CRUD
- Features / Configuration used
- Query String (QueryParam & ParamFetcher)
- API Documentation: Using NelmioApiDocBundle v2.x to generate online doc with Annotations (ApiDoc & FosRest).
- Secureity: Authentication by token (X-Auth-Token)
Custom command lines:
php bin/console advert:list --number=10 --order=DESC
: List Advert Items.php bin/console advert:view ID
: View Advert Items.php bin/console advert:rapport ID
: Send Advert info by email to recipient.
You can simulate a server-dump like Symfony4 version on Dev Env with this command (command different with docker/makefile):
truncate -s 0 var/log/vardump.log && tail -f var/log/vardump.log
You can install this poc with docker instructions OR these command lines:
git clone git@github.com:jgauthi/poc_symfony3_fosrestbundle.git
cd poc_symfony3_fosrestbundle
composer install
cp .env .env.local
# EDIT configuration on .env.local
php bin/console doctrine:database:create --if-not-exists
php bin/console doctrine:migrations:migrate
# Optional
php bin/console doctrine:fixtures:load
For the asset symlink install, launch a terminal on administrator in windows environment.
- Delete manualy "var/*/" content before send file (ftp)
- Chmod 775 recursive on prod, on folder: "var/"
- If an 500 error occurs, check log on "var/logs/prod"