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

[Uid] integration with the other components #36102

Open
nicolas-grekas opened this issue Mar 16, 2020 · 7 comments · May be fixed by #36317
Open

[Uid] integration with the other components #36102

nicolas-grekas opened this issue Mar 16, 2020 · 7 comments · May be fixed by #36317
Labels
Projects

Comments

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Mar 16, 2020

Now that the component is mostly ready, let's start integrating it with the rest of the stack.

Help wanted for finding where we want to have such integration.

What I spotted so far:

  • a normalizer/denormalizer for Serializer?
  • a command line to generate new UIDs?
  • an argument value resolver for controllers?
  • a form type?
  • a twig extension? (not sure about this one)
  • a Doctrine type? (see https://github.com/ramsey/uuid-doctrine)
  • a UID factory #36097

We could have a look at https://github.com/mcfedr/uuid-extra-bundle and https://github.com/ramsey/uuid-doctrine

Help wanted for the implementations!

@nicolas-grekas nicolas-grekas added this to Nicolas' in Help Wanted Mar 16, 2020
@lyrixx

This comment has been minimized.

Copy link
Member

@lyrixx lyrixx commented Mar 16, 2020

I agree with everything except:

a command line to generate new UIDs?

Useless IMHO. More over, it's juste a matter of php -r 'echo uuid_create();'. Or use any generator online

an argument value resolver for controllers?

Useless too imho. You usually want to get your entity, not the Id of the entity

a form type?

I don't understand what this will be

@ro0NL

This comment has been minimized.

Copy link
Contributor

@ro0NL ro0NL commented Mar 16, 2020

Dont forget about UuidValidator :) perhaps we can support ramsey/sf/pecl transparently here ... thus keep this one in the Validator component for general purposes. Then we can clean up its own UUID logic in favor of external infra, much like EmailValidator.

additionally, UlidValidator & co. for the Uid component.

@Nek-

This comment has been minimized.

Copy link
Contributor

@Nek- Nek- commented Mar 16, 2020

a command line to generate new UIDs?

Useless IMHO. More over, it's juste a matter of php -r 'echo uuid_create();'. Or use any generator online

  1. php -r 'echo uuid_create();' is a pain, and is not working without the uuid ext (+ this component/polyfill is kind of useless if you consider only this)
  2. The command uuidgen does a super-great-job.
  3. But still, not many people know this command... and it does not work on windows, on mac it generate UUIDs with caps... So I don't know, it may be a good thing.
@xabbuh xabbuh added the Uid label Mar 17, 2020
@gmponos

This comment has been minimized.

Copy link
Contributor

@gmponos gmponos commented Mar 20, 2020

Also a Uuid processor for monolog would be a nice idea... I can take on that.. it's simple.. but I guess this fits to the monolog-bundle? right?

@xabbuh

This comment has been minimized.

Copy link
Member

@xabbuh xabbuh commented Mar 21, 2020

@gmponos The processor is probably best places in the Monolog bridge while its wiring would happen in the bundle.

@vudaltsov

This comment has been minimized.

Copy link
Contributor

@vudaltsov vudaltsov commented Mar 22, 2020

I agree that a console command does not seem to be useful. Most devs use plugins in their editors like https://plugins.jetbrains.com/plugin/8320-uuid-generator or https://plugins.jetbrains.com/plugin/9836-randomness with multicursor support and etc.

@guillbdx

This comment has been minimized.

Copy link
Contributor

@guillbdx guillbdx commented Mar 26, 2020

I'm working on a PR for these features.

@guillbdx guillbdx linked a pull request that will close this issue Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Help Wanted
Nicolas'
Linked pull requests

Successfully merging a pull request may close this issue.

8 participants
You can’t perform that action at this time.