-
-
Notifications
You must be signed in to change notification settings - Fork 912
Add Symfony Uid support #3715
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
Add Symfony Uid support #3715
Conversation
norkunas
commented
Sep 10, 2020
Q | A |
---|---|
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tickets | fixes #3714 |
License | MIT |
Doc PR | api-platform/docs#... |
- Added support for denormalizing identifiers with symfony uuid/ulid;
- Added ulid/uuid support to json schema;
b06aa3b
to
88b9bb5
Compare
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.
👍
8ff7e03
to
b49a163
Compare
b49a163
to
7ba124a
Compare
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.
Very nice!
Thanks a lot @norkunas! |
See also: symfony/symfony#36406. |
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
|
||
<services> | ||
<service id="api_platform.identifier.symfony_ulid_normalizer" class="ApiPlatform\Core\Bridge\Symfony\Identifier\Normalizer\UlidNormalizer" public="false"> |
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.
Why not make the two Normalizers in one?
Like this : https://github.com/symfony/symfony/blob/dafcc58e6bd8553a6f461ff585322206ffd81956/src/Symfony/Component/Serializer/Normalizer/UidNormalizer.php#L40-L55
@@ -53,6 +53,7 @@ | ||
use Symfony\Component\Finder\Finder; | ||
use Symfony\Component\HttpClient\HttpClientTrait; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\Uid\AbstractUid; | ||
use Symfony\Component\Validator\Validator\ValidatorInterface; |
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.
use Symfony\Component\Validator\Validator\ValidatorInterface; | |
use Symfony\Component\Validator\Validator\ValidatorInterface; |
@@ -53,6 +53,7 @@ | ||
use Symfony\Component\Finder\Finder; | ||
use Symfony\Component\HttpClient\HttpClientTrait; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\Uid\AbstractUid; | ||
use Symfony\Component\Validator\Validator\ValidatorInterface; | ||
use Symfony\Component\Yaml\Yaml; |
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.
use Symfony\Component\Yaml\Yaml; | |
use Symfony\Component\Yaml\Yaml; |
@@ -113,6 +113,8 @@ jobs: | ||
run: | | ||
composer global require --prefer-dist --no-progress --no-suggest --ansi \ |
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.
composer global require --prefer-dist --no-progress --no-suggest --ansi \ | |
composer global require --prefer-dist --no-progress --no-suggest --ansi \ |
@@ -53,6 +53,7 @@ | ||
use Symfony\Component\Finder\Finder; |
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.
use Symfony\Component\Finder\Finder; | |
use Symfony\Component\Finder\Finder; |