Skip to content

Commit

Permalink
use no_driver parameter and modify post-install.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
tattali committed Aug 16, 2018
1 parent 176e34b commit 9bd9382
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
11 changes: 6 additions & 5 deletions friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
fos_user:
db_driver: orm
db_driver: no_driver # valid values are 'orm', 'mongodb' and 'couchdb'
user_class: App\Entity\User
firewall_name: main
service:
mailer: fos_user.mailer.noop
firewall_name: main
user_class: App\Entity\User
from_email:
address: "address"
sender_name: "name"
address: "%env(MAILER_SENDER_ADDRESS)%"
sender_name: "%env(MAILER_SENDER_NAME)%"

4 changes: 4 additions & 0 deletions friendsofsymfony/user-bundle/2.1/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"env": {
"MAILER_SENDER_ADDRESS": "[email protected]",
"MAILER_SENDER_NAME": "John Doe"
}
}
13 changes: 8 additions & 5 deletions friendsofsymfony/user-bundle/2.1/post-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
<bg=blue;fg=white> What's next? </>
<bg=blue;fg=white> </>

Warning: make sure the twig engine is turned on in framework.yaml
- If not, install a driver storage and change it in <fg=green>config/packages/fos_user.yaml</>

- Modify your email address config in <fg=green>config/packages/fos_user.yaml</>
- Modify your email address config in <fg=green>.env</>

- If not, add the following to <fg=green>config/packages/framework.yaml</>:
- Uncomment <fg=green>csrf_protection</> and make sure <fg=green>twig engine</> is turned on by adding in <fg=green>config/packages/framework.yaml</>:

framework:
# ...
csrf_protection: { enabled: true }
csrf_protection: true
templating:
engines: ['twig']

- Create your User class
https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-3-create-your-user-class

- Modify your security configuration in <fg=green>config/packages/security.yaml</>
https://symfony.com/doc/2.0/bundles/FOSUserBundle/index.html#step-4-configure-your-application-s-security-yml
https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-4-configure-your-application-s-security-yml

0 comments on commit 9bd9382

Please sign in to comment.