From c69e8d961d01c31db29432b8716b98d935f6af31 Mon Sep 17 00:00:00 2001 From: Julian Finkler Date: Thu, 12 Apr 2018 19:51:23 +0200 Subject: [PATCH 1/3] Add FOS User Bundle recipe --- .../2.1/config/packages/fos_user.yaml | 8 +++++ .../user-bundle/2.1/manifest.json | 12 +++++++ .../user-bundle/2.1/post-install.txt | 31 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml create mode 100644 friendsofsymfony/user-bundle/2.1/manifest.json create mode 100644 friendsofsymfony/user-bundle/2.1/post-install.txt diff --git a/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml b/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml new file mode 100644 index 000000000..f00356ed9 --- /dev/null +++ b/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml @@ -0,0 +1,8 @@ +# 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_SENDER_ADDRESS)%" + sender_name: "%env(MAILER_SENDER_NAME)%" diff --git a/friendsofsymfony/user-bundle/2.1/manifest.json b/friendsofsymfony/user-bundle/2.1/manifest.json new file mode 100644 index 000000000..a06bf529c --- /dev/null +++ b/friendsofsymfony/user-bundle/2.1/manifest.json @@ -0,0 +1,12 @@ +{ + "bundles": { + "FOS\\UserBundle\\FOSUserBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "MAILER_SENDER_ADDRESS": "joh.doe@localhost.tld", + "MAILER_SENDER_NAME": "John Doe" + } +} \ No newline at end of file diff --git a/friendsofsymfony/user-bundle/2.1/post-install.txt b/friendsofsymfony/user-bundle/2.1/post-install.txt new file mode 100644 index 000000000..2440f5a47 --- /dev/null +++ b/friendsofsymfony/user-bundle/2.1/post-install.txt @@ -0,0 +1,31 @@ + + What\'s next? + + +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\'] + +Set MAILER_SENDER_ADDRESS and MAILER_SENDER_NAME in your .env file + + + Follow this steps in the Documentation + + +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 + (config/packages/security.yaml) + + 3. Step 6: Import FOSUserBundle routing files + (config/routes.yaml) + + 4. Step 7: Update your database schema From f36e74687940b65068ebe23835df8e1e5a5d9f6b Mon Sep 17 00:00:00 2001 From: Julian Finkler Date: Thu, 12 Apr 2018 19:52:55 +0200 Subject: [PATCH 2/3] Add new line to manifest.json --- friendsofsymfony/user-bundle/2.1/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/friendsofsymfony/user-bundle/2.1/manifest.json b/friendsofsymfony/user-bundle/2.1/manifest.json index a06bf529c..483470cfb 100644 --- a/friendsofsymfony/user-bundle/2.1/manifest.json +++ b/friendsofsymfony/user-bundle/2.1/manifest.json @@ -9,4 +9,4 @@ "MAILER_SENDER_ADDRESS": "joh.doe@localhost.tld", "MAILER_SENDER_NAME": "John Doe" } -} \ No newline at end of file +} From fa2012692cebf119f8377ff7fbc1d2dc250e5c77 Mon Sep 17 00:00:00 2001 From: Julian Finkler Date: Thu, 12 Apr 2018 19:59:58 +0200 Subject: [PATCH 3/3] Set noop mailer service --- .../user-bundle/2.1/config/packages/fos_user.yaml | 2 ++ friendsofsymfony/user-bundle/2.1/post-install.txt | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml b/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml index f00356ed9..b298e7785 100644 --- a/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml +++ b/friendsofsymfony/user-bundle/2.1/config/packages/fos_user.yaml @@ -3,6 +3,8 @@ 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)%" diff --git a/friendsofsymfony/user-bundle/2.1/post-install.txt b/friendsofsymfony/user-bundle/2.1/post-install.txt index 2440f5a47..652b3dfd8 100644 --- a/friendsofsymfony/user-bundle/2.1/post-install.txt +++ b/friendsofsymfony/user-bundle/2.1/post-install.txt @@ -13,7 +13,9 @@ framework: templating: engines: [\'twig\'] -Set MAILER_SENDER_ADDRESS and MAILER_SENDER_NAME in your .env file +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 Follow this steps in the Documentation @@ -29,3 +31,4 @@ See https://symfony.com/doc/master/bundles/FOSUserBundle/index.html (config/routes.yaml) 4. Step 7: Update your database schema +