-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
Drop FOSUserBundle with minimum functionality #1256
Conversation
Could you please rebase your PR and fix merge conflicts? |
@@ -23,7 +23,6 @@ | |||
"require": { | |||
"php": "^7.2", | |||
"doctrine/common": "^2.0", | |||
"friendsofsymfony/user-bundle": "^2.0", |
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.
@wbloszyk I removed FosUserBundle from other project and I needed to add
- symfony/security-bundle ("maybe" you don't need this because we are adding
symfony/security-core
) - doctrine/annotations
- symfony/validator
11aee55
to
90076b5
Compare
d95e577
to
8e996a5
Compare
@sonata-project/contributors Can you check it? IMO it is good star point to work on SonataUserBundle v4. |
class: # Entity Classes | ||
user: Application\Sonata\UserBundle\Entity\User | ||
group: Application\Sonata\UserBundle\Entity\Group | ||
class: # Entity Classes | ||
user: 'App\Entity\SonataUserUser' | ||
group: 'App\Entity\SonataUserGroup' |
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.
Previously the entity was in the UserBundle, now it have to be created by the user ?
Cant/Shouldnt we provide a User class ?
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.
Previus we are using EasyExtendsBundle to do it in Application\Sonata\UserBundle\Entity\User
.
IMO in UserBundle v4 we should provide recipies with default entities. Using Sonata\UserBundle\Entity\BaseUser
will be also allowed.
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.
So we shouldn't use 'App\Entity\SonataUserUser'
in the config
But 'Sonata\UserBundle\Entity\User'
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.
I recheck it. It is not possible to use Sonata\UserBundle\Entity\BaseUser
. I think it is not possible to provide User class in easy way. We should not provide User identifier by own and can not use two User classes for one entity. So we must keep App\Entity\SonataUserUser
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.
Why ?
You still provide the classes BaseUser and a BaseGroup. What's wrong with them.
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.
But these classes must be override to configure identifier for them. Also in other bundles we are using App\Entity\Sonata*
https://github.com/sonata-project/SonataPageBundle/blob/3.x/docs/reference/advanced_configuration.rst
https://github.com/sonata-project/SonataArticleBundle/blob/1.x/docs/reference/configuration.rst
https://github.com/sonata-project/SonataMediaBundle/blob/3.x/docs/reference/advanced_configuration.rst
https://github.com/sonata-project/SonataNewsBundle/blob/3.x/docs/reference/advanced_configuration.rst
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.
Ok, so we should add a note about the interface that the customUser/Group need to implements and be sure it's clear we provide a Base class to help developers.
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.
I did not work on upgrade note jet. I waiting for appove current change. Then I will update note based on approved changes.
$container->setAlias('sonata.user.util.email_canonicalizer', $config['service']['email_canonicalizer']); | ||
$container->setAlias('sonata.user.util.username_canonicalizer', $config['service']['username_canonicalizer']); | ||
$container->setAlias('sonata.user.util.token_generator', $config['service']['token_generator']); | ||
//$container->setAlias('sonata.user.user_manager', new Alias($config['service']['user_manager'], true)); |
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.
?
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 utils was moved from FOSUserBundle (to keep the same functionality like with FOSUSer). In next PRs we can remove it.
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.
I mean, why is there a line commented ?
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.
Becouse it this alias is create in line 305. For now I do not know what to do with it.
Could you please rebase your PR and fix merge conflicts? |
any advancement on this? |
Feel free to overtake the pr |
7fa7c50
to
351a5c0
Compare
Could you please rebase your PR and fix merge conflicts? |
|
||
パスワードをリセットするには、次のリセット URL へアクセスしてください %confirmationUrl% | ||
|
||
|
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.
- yamllint: too many blank lines (2 > 1) (empty-lines)
Could you please rebase your PR and fix merge conflicts? |
Closed in favor of #1449 |
Subject
This PR move minimul functionality from FOSUserBundle which will be allow using SonataUserBundle without FOSUserBundle dependencies/inheritance.
I am targeting this branch, because this change are BC-BREAK.
Closes #1255
Changelog
To do