-
-
Notifications
You must be signed in to change notification settings - Fork 630
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 recipe for FOSUserBundle #270
Changes from 8 commits
db02850
7e5d3ec
e123d02
f5c0597
f1f2b70
dfb8b22
53c9524
176e34b
9bd9382
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,9 @@ | ||
fos_user: | ||
db_driver: orm | ||
service: | ||
mailer: fos_user.mailer.noop | ||
firewall_name: main | ||
user_class: App\Entity\User | ||
from_email: | ||
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. Can you use that :
|
||
address: "address" | ||
sender_name: "name" | ||
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. @tattali FOSUserBundle can be used without fos_user:
service:
mailer: fos_user.mailer.twig_swift It can be used even without 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 sorry when I did the search I did not see your recipe. If you want we can use yours that looks more accomplished. 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. There is no my recipe as there is no v2.1 release yet =) And it is not possible to create recipe right now, because even with new |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
fos_user_security: | ||
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. Why you didn't load the routes like that ?
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. People may not need every routes 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. You're right, it seems good to me 👍 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. me too I hope this PR FriendsOfSymfony/FOSUserBundle#2708 will be merged soon |
||
resource: "@FOSUserBundle/Resources/config/routing/security.xml" | ||
|
||
fos_user_profile: | ||
resource: "@FOSUserBundle/Resources/config/routing/profile.xml" | ||
prefix: /profile | ||
|
||
fos_user_register: | ||
resource: "@FOSUserBundle/Resources/config/routing/registration.xml" | ||
prefix: /register | ||
|
||
fos_user_resetting: | ||
resource: "@FOSUserBundle/Resources/config/routing/resetting.xml" | ||
prefix: /resetting | ||
|
||
fos_user_change_password: | ||
resource: "@FOSUserBundle/Resources/config/routing/change_password.xml" | ||
prefix: /profile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bundles": { | ||
"FOS\\UserBundle\\FOSUserBundle": ["all"] | ||
}, | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/", | ||
"src/": "%SRC_DIR%/" | ||
} | ||
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. Add the env var
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<bg=blue;fg=white> </> | ||
<bg=blue;fg=white> What's next? </> | ||
<bg=blue;fg=white> </> | ||
|
||
Warning: make sure the twig engine is turned on in framework.yaml | ||
|
||
- Modify your email address config in <fg=green>config/packages/fos_user.yaml</> | ||
|
||
- If not, add the following to <fg=green>config/packages/framework.yaml</>: | ||
|
||
framework: | ||
# ... | ||
csrf_protection: { enabled: true } | ||
templating: | ||
engines: ['twig'] | ||
|
||
- 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
use FOS\UserBundle\Model\User as BaseUser; | ||
|
||
/** | ||
* @ORM\Entity | ||
* @ORM\Table(name="fos_user") | ||
*/ | ||
class User extends BaseUser | ||
{ | ||
/** | ||
* @ORM\Column(type="integer") | ||
* @ORM\Id | ||
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. Can you switch order with line above please 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 entity is maybe going to disappear because it's a doctrine orm entity and not mongo or couchdb |
||
* @ORM\GeneratedValue(strategy="AUTO") | ||
*/ | ||
protected $id; | ||
|
||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
// your own logic | ||
} | ||
} |
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.
Can you move
service
block betweenuser_class
andfrom_email
for more readability please?