Closed (fixed)
Project:
JSON:API
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Feb 2019 at 23:58 UTC
Updated:
8 Mar 2019 at 15:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gabesulliceDone.
Stats from the
srcdirectory ^Comment #3
gabesulliceComment #5
wim leersThis fixes most failures.
Comment #7
wim leersOne fail. (And 5 CS violations.)
Comment #8
gabesulliceRerolled and fixed CS violations.
This should still fail.
Comment #10
gabesulliceThis should pass 🤞
Comment #11
gabesullicePatch for JSON:API Extras ^^^, all of which is test-only. Consumer Image Styles should be unaffected.
Comment #12
wim leers#11: Only deletes for JSON:API Extras, yay! That means less brittleness, less coupling to (private) implementation details, less future breakage 👍
8 files changed, 172 insertions, 503 deletions.🤔 Why are we changing this assertion? If I revert this change, tests still pass.
👍 Elegant!
🔍🐛 Accidental whitespace-only change, let's revert.
👌
✅ This test coverage is hardly worth keeping, it's far more complex than the trivial code it provides test coverage for. Plus, our functional tests more than cover this.
Only this test coverage is testing nontrivial code, but here too the test coverage is so tightly coupled to implementation details and burdened with such complex mocks that it is not at all clear how much reassurances this is actually getting us.
I'd fix point 4 on commit, but keeping NR for point 2.
Comment #13
gabesulliceFixed #12.4.
12.2:
$context['resource_object']gets passed to$this->getRelationshipLinks()which type hintsResourceObject. I was just updating the assertion to be "honest" about what was expected for the normalization context.Comment #14
wim leersBut that too doesn't use anything on
ResourceObject, it only uses methods onResourceIdentifierInterface. So why can't we just typehint to that?Comment #15
gabesulliceBecause a relationship is always present in the context of a resource object. Also, see: #2992836-40: Provide links to resource versions (entity revisions)
Comment #16
wim leersThat is a solid reason. I'm convinced :)
I'm RTBC'ing and committing because:
LinkCollection(the new intended API) infrastructure instead ofLinkManager(the originally intended API)Comment #18
wim leers