Install Symfony 4 skeleton
composer create-project symfony/skeleton my-project && cd my-project
Use git
to versionize your project
git init
git add .
git commit -m "Initial commit with sf4"
Install dev
packages :
- sec-checker : check on each package installation if the package contains vulnerabilities
- profiler : Add Symfony dev bar
- server : Virtual web server command line tool
composer require --dev sec-checker profiler server
Install required CRUD packages to fill up best practices :
- annotations : To use annotation routes
- twig : Templating engine
- asset : To link assets from
public/
folder - translator : Allow translations in the project
- form : Add symfony form component
- doctrine : ORM to manage the database
- validator : Add form validations (Assert)
composer require annotations twig asset translator form doctrine validator
Use doctrine fixture bundle to add fake data
composer require --dev doctrine/doctrine-fixtures-bundle
Install maker to use symfony generator
composer require maker
For firewall configuration
composer require security
git add .
git commit -m "Basis packages"