-
-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FOS User Bundle recipe #345
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Read the documentation: https://symfony.com/doc/master/bundles/FOSUserBundle/index.html | ||
fos_user: | ||
db_driver: orm # other valid values are 'mongodb' and 'couchdb' | ||
firewall_name: main | ||
user_class: AppBundle\Entity\User | ||
service: | ||
mailer: 'fos_user.mailer.noop' | ||
from_email: | ||
address: "%env(MAILER_SENDER_ADDRESS)%" | ||
sender_name: "%env(MAILER_SENDER_NAME)%" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"bundles": { | ||
"FOS\\UserBundle\\FOSUserBundle": ["all"] | ||
}, | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/" | ||
}, | ||
"env": { | ||
"MAILER_SENDER_ADDRESS": "[email protected]", | ||
"MAILER_SENDER_NAME": "John Doe" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<bg=blue;fg=white> </> | ||
<bg=blue;fg=white> What\'s next? </> | ||
<bg=blue;fg=white> </> | ||
|
||
Make sure the twig is installed and the twig engine is turned on | ||
in framework.yaml | ||
|
||
* If not, install twig, then add the following to | ||
config/packages/framework.yaml: | ||
|
||
framework: | ||
# ... | ||
templating: | ||
engines: [\'twig\'] | ||
|
||
<fg=yellow>For sending e mails:</> | ||
1. Set MAILER_SENDER_ADDRESS and MAILER_SENDER_NAME in your .env file | ||
2. Configure the mailer service in config/packages/fos_user.yaml | ||
|
||
<bg=blue;fg=white> </> | ||
<bg=blue;fg=white> Follow this steps in the Documentation </> | ||
<bg=blue;fg=white> </> | ||
|
||
See https://symfony.com/doc/master/bundles/FOSUserBundle/index.html | ||
|
||
1. Step 3: Create your User class | ||
2. Step 4: Configure your application\'s security.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we also do this in the recipe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm... I don't see any way to modify the application's |
||
(config/packages/security.yaml) | ||
|
||
3. Step 6: Import FOSUserBundle routing files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be done in in the recipe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. Before I get back to work i'll wait for the merge of my pull request from above |
||
(config/routes.yaml) | ||
|
||
4. Step 7: Update your database schema | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add this in the recipe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This very use case specific. i think, the developer should create the user class on his own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but we could help the user. We could create a class named
User
that implements the interface.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can do that