Skip to content

[Uid] integration with the other components #36102

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

Closed
3 tasks done
nicolas-grekas opened this issue Mar 16, 2020 · 10 comments
Closed
3 tasks done

[Uid] integration with the other components #36102

nicolas-grekas opened this issue Mar 16, 2020 · 10 comments
Labels
Help wanted Issues and PRs which are looking for volunteers to complete them. Uid

Comments

@nicolas-grekas
Copy link
Member

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:

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!

@lyrixx
Copy link
Member

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
Copy link
Contributor

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-
Copy link
Contributor

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
@nicolas-grekas nicolas-grekas added the Help wanted Issues and PRs which are looking for volunteers to complete them. label Mar 20, 2020
@gmponos
Copy link
Contributor

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
Copy link
Member

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
Copy link
Contributor

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
Copy link

guillbdx commented Mar 26, 2020

I'm working on a PR for Validator, Normalizer and Command.

nicolas-grekas added a commit that referenced this issue Sep 3, 2020
…adigennadigennadi)

This PR was merged into the 5.2-dev branch.

Discussion
----------

[DoctrineBridge] Ulid and Uuid as Doctrine Types

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | #36102 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

This Types Implementations are basically copies from https://github.com/ramsey/uuid-doctrine, with minor tweaks to use Symfonys Uid classes.

I am not done yet. I'm going to implement some UnitTests and I also do need to add the Changelog Entries.

And I do ask my self if the Types should be registered automatically (with the recipe?), cause it would collide with Ramseys uuids implementation.

Commits
-------

f44fa34 [DoctrineBridge] Ulid and Uuid as Doctrine Types
@fabpot fabpot closed this as completed Sep 11, 2020
fabpot added a commit that referenced this issue Sep 11, 2020
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Serializer] add UidNormalizer

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #36102
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

UUID and ULID normalizer.

Continuation of #36406

Commits
-------

d6a8993 Update based on feedback
1c21c78 UidNormalizer.
@Gemorroj
Copy link
Contributor

@nicolas-grekas need add form type at least. At this time we can't use the default TextType for Uuid. Need make setter or tranformer to use Uuid with Symfony froms.

@nicolas-grekas
Copy link
Member Author

@Gemorroj would you be up to work on this?

@Gemorroj
Copy link
Contributor

@nicolas-grekas I'll try it #39863

xabbuh added a commit that referenced this issue Jan 19, 2021
…rroj)

This PR was merged into the 5.3-dev branch.

Discussion
----------

[Form][Uid] Add UlidType and UuidType form types

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #36102
| License       | MIT
| Doc PR        |

Commits
-------

c84746b add UlidType and UuidType form types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Issues and PRs which are looking for volunteers to complete them. Uid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants