Skip to content
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

standart User toString convert #4195

Closed
ivan1986 opened this issue May 3, 2012 · 7 comments
Closed

standart User toString convert #4195

ivan1986 opened this issue May 3, 2012 · 7 comments
Labels

Comments

@ivan1986
Copy link

ivan1986 commented May 3, 2012

1d5538f#diff-61

why remove toString() ?

it get error for example in sonata admin if you login using in_memory admin

@stof
Copy link
Member

stof commented May 3, 2012

If SonataAdminBundle is broken without a toString method, it is a bug in the bundle so you should report it in the tracker of the bundle. Removing the mandatory toString method has been done before the first beta of Symfony so there is absolutely no valid reason to expect it in some code.

@ivan1986
Copy link
Author

ivan1986 commented May 3, 2012

SonataAdminBundle is an example of the use, other users implement such FOSUser converted to a string, which is logical, the problem only occurs when you use this member, plus another class declared final

sonata-project/SonataUserBundle#70

@ivan1986
Copy link
Author

ivan1986 commented May 3, 2012

Not very well to remove this from the interface, as concluded by it's still a good thing, and why it was removed is not clear

@stof
Copy link
Member

stof commented May 3, 2012

@ivan1986 This has been removed from the interface because the Security component does not require having such method anyway. And the use of this method has been dropped because the expectation was in fact to have a __toString method returning the username.

@ivan1986
Copy link
Author

ivan1986 commented May 4, 2012

and why it class is final? I can not add __toString and use this class as base

@stof
Copy link
Member

stof commented May 4, 2012

you cannot make the in_memory provider use another class anyway.

@fabpot
Copy link
Member

fabpot commented Jul 10, 2012

Closing this issue as there is nothing to "fix".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants