Skip to content

Fix ResourceClassResolver handling of inheritance #2797

Merged
teohhanhui merged 2 commits into
api-platform:2.4from
teohhanhui:fix/resource-class-resolver-inheritance
May 22, 2019
Merged

Fix ResourceClassResolver handling of inheritance #2797
teohhanhui merged 2 commits into
api-platform:2.4from
teohhanhui:fix/resource-class-resolver-inheritance

Conversation

@teohhanhui

@teohhanhui teohhanhui commented May 15, 2019

Copy link
Copy Markdown
Contributor
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #2609, #2683, #2759
License MIT
Doc PR N/A

Alternative to #2714

TODO:

Notable changes:

  • ResourceClassResolver returns the most specific resource class for an object.
  • Use ResourceClassResolver where we didn't before.
  • Denormalization of non-resources no longer handled by our ItemNormalizer.

@teohhanhui
teohhanhui force-pushed the fix/resource-class-resolver-inheritance branch 3 times, most recently from ebc7fd2 to 6e8588b Compare May 17, 2019 04:16
@teohhanhui teohhanhui changed the title [WIP] Fix ResourceClassResolver handling of inheritance Fix ResourceClassResolver handling of inheritance May 17, 2019
@teohhanhui
teohhanhui force-pushed the fix/resource-class-resolver-inheritance branch 3 times, most recently from f304bba to 3598dcd Compare May 17, 2019 19:03
@teohhanhui
teohhanhui requested review from antograssiot, dunglas, meyerbaptiste and soyuka and removed request for soyuka May 17, 2019 19:05
@teohhanhui
teohhanhui force-pushed the fix/resource-class-resolver-inheritance branch 2 times, most recently from aafd6c7 to 3fc76f1 Compare May 17, 2019 19:19
@teohhanhui

Copy link
Copy Markdown
Contributor Author

Hmm... 1 test fails on PostgreSQL: https://travis-ci.org/api-platform/core/jobs/533956026#L770-L777

I'm not sure what is going on. 😆

@teohhanhui

Copy link
Copy Markdown
Contributor Author

Fixed failing test on postgres.

Comment thread src/Api/IdentifiersExtractor.php Outdated
Comment thread src/Api/ResourceClassResolver.php Outdated
Comment thread src/Bridge/Doctrine/EventListener/PublishMercureUpdatesListener.php Outdated
Comment thread src/Bridge/Symfony/Routing/IriConverter.php Outdated
Comment thread src/Serializer/AbstractItemNormalizer.php
Comment thread src/Serializer/AbstractItemNormalizer.php Outdated
Comment thread src/Serializer/AbstractItemNormalizer.php Outdated
@vincentchalamon
vincentchalamon removed their request for review May 20, 2019 14:59
@teohhanhui
teohhanhui force-pushed the fix/resource-class-resolver-inheritance branch 3 times, most recently from 1d0127f to d3d173a Compare May 20, 2019 17:06
@teohhanhui
teohhanhui requested a review from dunglas May 20, 2019 17:34
@teohhanhui
teohhanhui force-pushed the fix/resource-class-resolver-inheritance branch from d3d173a to 6d02057 Compare May 20, 2019 17:57
teohhanhui and others added 2 commits May 20, 2019 20:01
Co-authored-by: Vincent Chalamon <vincentchalamon@gmail.com>
Co-authored-by: "Nek (Maxime Veber)" <nek.dev@gmail.com>
@teohhanhui
teohhanhui force-pushed the fix/resource-class-resolver-inheritance branch 2 times, most recently from 9156bc3 to 79c3a65 Compare May 21, 2019 17:45

@soyuka soyuka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@teohhanhui
teohhanhui merged commit 717b909 into api-platform:2.4 May 22, 2019
@teohhanhui
teohhanhui deleted the fix/resource-class-resolver-inheritance branch May 22, 2019 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants