From c10422515d99bba69d51b37dad33eac9517346a1 Mon Sep 17 00:00:00 2001 From: Djyp Date: Wed, 25 Apr 2018 14:35:51 +0200 Subject: [PATCH] Update setup.md --- doc/setup.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/doc/setup.md b/doc/setup.md index 6a69182cc..5d528ec4d 100644 --- a/doc/setup.md +++ b/doc/setup.md @@ -16,7 +16,7 @@ cd tutorial ### Composer ``` -composer require victoire/victoire:^2.2 twig/twig:~2.0 +composer require victoire/victoire twig/twig:~2.0 ``` ### AppKernel @@ -75,6 +75,8 @@ class AppKernel extends Kernel ]; } ``` +I deleted : +```new AppBundle\AppBundle(),``` ### Start a redis server @@ -88,21 +90,17 @@ docker run -d -p 6379:6379 --name myAwesomeRedis redis:latest ### Config #### Enable the serializer and translator +### Add some config `app/config/config.yml` ```yml framework: ... - translator: { fallbacks: ["%locale%"] } - serializer: { enable_annotations: true } - templating: - engines: ['twig'] + translator: { fallbacks: ["%locale%"] } + serializer: { enable_annotations: true } + templating: + engines: ['twig'] -``` - -#### Add some config -`app/config/config.yml` -```yml imports: ... - { resource: "@VictoireCoreBundle/Resources/config/config.yml" } @@ -161,10 +159,13 @@ victoire_i18n: `app/config/security.yml` `Replace the current security.yml with this one` ``` +# To get started with security, check out the documentation: security: encoders: Victoire\Bundle\UserBundle\Entity\User: bcrypt providers: + in_memory: + memory: ~ fos_userbundle: id: fos_user.user_provider.username firewalls: @@ -190,6 +191,7 @@ security: `app/config/services.yml` ``` services: + ... twig.extension.text: class: Twig_Extensions_Extension_Text tags: @@ -240,6 +242,10 @@ VictoireCoreBundle: resource: . type: victoire_i18n ``` +If necessary, generate your missing parameters in parameters.yml: +``` +composer install +``` As it never hurts, let's finish the configuration steps by clearing the cache: @@ -342,7 +348,7 @@ Updating database schema... ``` Don't worry: it will disapear as soon as you will install some non-official widgets (hosted in the `friendsofvictoire` organization. -Find others widget [**here**](http://packagist.org/search/?tags=victoire) +Find others widget [**on packagist**](http://packagist.org/search/?tags=victoire) ### Prepare Victoire assets @@ -358,14 +364,15 @@ bin/console victoire:ui:fetchAssets --force #### Dump js routes and translations ``` -php bin/console fos:js-routing:dump -e=dev -php bin/console bazinga:js-translation:dump -e=dev +bin/console fos:js-routing:dump -e=dev +bin/console bazinga:js-translation:dump -e=dev ``` #### Dump with assetic Run the following command to dump assets with assetic library: +`CAUTION` you need to install less first ```npm i -g less``` ```shell bin/console assetic:dump ```