Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[UID] Added the component + Added support for UUID#35940
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
546a7b9
to232c30b
CompareThere 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.
Nice thank you, very simple!
Why in the string component ?
Because that's where it fits bests to me: theString
component gathers simple "string-like" value objects; UUID is an important one of them.
Uh oh!
There was an error while loading.Please reload this page.
Given the number of UUID libraries in PHP/Symfony land (refhttps://jolicode.com/blog/uuid-generation-in-php ), I would say this topic is oversaturated with libraries already. Is there a major pro for this new class instead of the Pecl extension/Symfony Polyfill or Ramsey UUID? |
nicolas-grekas commentedMar 3, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Where do you see saturation here? pecl is low level: there need to be a value object in our OOP code. polyfill is ... a polyfill, and FFI+libuuid is a POC. Which means there is only one single available (and mainstream) implementation: ramsey/uuid. |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
It does provide a lot: e.g a VO integrates with Doctrine types. The pecl extension doesn't. About the doc for deps, there's nothing specific to this PR... The argument would apply to any new feature with optional deps... |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This comment has been minimized.
This comment has been minimized.
Agreed on the new component proposal. |
did we consider adding polyfill support for ramsey/uuid? esp. since it has 1st class pecl support already: https://github.com/ramsey/uuid/blob/b31703e7c9752260ddc773c95110294fa9abc5ff/src/FeatureSet.php#L84
so, we shouldnt resort to ramsey/uuid for simple/non-fancy uuids? i feel like we're defeating it's UuidInterface + the fact most of the ecosystem is using it already.
so does ramsey/uuid. im rather skeptical about |
localheinz left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
👍
Looks good to me code-wise.
However, I agree with@theofidry.
I believe the general question the core team need to discuss is whether Symfony wants to follow the same route Zend Framework did about a decade ago (pulling in a component for every single use case), or whether that is really necessary.
Pulling in a component for every single use case has the following down-sides:
- more work required by maintainers
- more maintainers required
- more documentation required
- more bug fixes required
- more signal and noise on the central
symfony/symfony
repository - killing successful 3rd-party libraries
Not sure ifsymfony/symfony
really needs to become that big black 🕳, sucking in everything around 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've no strong opinion regarding if we need a new component or if we can just rely onramsey/uuid
, but 👍 regarding the code).
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just a random thought: Would the idea of the Uid component be stronger if we add a |
@wouterj What would be the interface ? |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
2 minors
Uh oh!
There was an error while loading.Please reload this page.
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.
Still good to me after the recent changes. Good to go on my side.
Thank you@lyrixx. |
Uh oh!
There was an error while loading.Please reload this page.