-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[uid] Please add ::toString() method to Symfony/Uid #53333
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
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Completely agree with you that Another alternative, as long as you don't |
There are multiple ways you can visualize the UIDs implemented by the component as string. E.g. the If you care about it being a string, it's probably also better to be explicit about which string format you want. If you don't care about its string visualization, but you just pass it to another domain expecting a string ID, you can either rely on PHP's type casting or use explicit casting using |
I think having |
Description
Just like the Ramsey class, we just want to print that uid as a string.
Currently, we must use
::toRfc4122()
which every time makes me wonder "what is rfc 4122? I have to google that" and I waste time because I'm not sure it's the proper method, or as an alternative:->__toString()
(string) cast
which are aesthetically unpleasing. It would be a quality of life improvement to have a simple ->toString() method."
Example
No response
The text was updated successfully, but these errors were encountered: