Skip to content

Commit

Permalink
Update setup.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Djyp authored and lenybernard committed Apr 30, 2018
1 parent b4c8b02 commit c104225
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions doc/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -75,6 +75,8 @@ class AppKernel extends Kernel
];
}
```
I deleted :
```new AppBundle\AppBundle(),```

### Start a redis server

Expand All @@ -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" }
Expand Down Expand Up @@ -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:
Expand All @@ -190,6 +191,7 @@ security:
`app/config/services.yml`
```
services:
...
twig.extension.text:
class: Twig_Extensions_Extension_Text
tags:
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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

Expand All @@ -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
```
Expand Down

0 comments on commit c104225

Please sign in to comment.