Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions friendsofsymfony/user-bundle/2.0/config/packages/fos_user.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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
from_email:
address: "%env(MAILER_USER)%"
sender_name: "%env(MAILER_USER)%"

services:
validator.builder:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's absolutely not how the recipe should work. Instead, the package itself should require the Symfony package that installs this service, which is symfony/validator in this case.

This is a problem from the FOSUserBundle side that should be fixed before a recipe can be created.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh... I understand, sorry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This service should be removed. You use add symfony/validator to the dependencies section in your composer.json.

class: Symfony\Component\Config\Definition\Builder\ValidationBuilder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should end with a newline

11 changes: 11 additions & 0 deletions friendsofsymfony/user-bundle/2.0/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"bundles": {
"FOS\\UserBundle\\FOSUserBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"MAILER_USER": ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MAILER_USER is inconsistent with possible configuration value. I think MAILER_SENDER would probably be more appropriate. A "user" option is more to configure the mailer with a user.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

}
}