Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Discovered as part of #2962443: Remove route object and route requirements access.
This is a small step in untangling the normalizer dependencies.
Comment | File | Size | Author |
---|---|---|---|
#22 | 2962461-22.patch | 6.59 KB | Wim Leers |
| |||
#22 | interdiff.txt | 1.12 KB | Wim Leers |
#19 | 2962461-19.patch | 5.92 KB | Wim Leers |
#19 | interdiff.txt | 5.26 KB | Wim Leers |
#9 | 2962461-9.patch | 2.48 KB | Wim Leers |
|
Comments
Comment #2
gabesulliceComment #3
gabesulliceComment #4
Wim LeersCI error because
Retesting.
Why this change? Seems unrelated.
Comment #5
gabesulliceIts only purpose is to set the serializer on
JsonApiDocumentTopLevelNormalizer
, which isn't necessary anymore because the DI container should already be doing this for us, which is the point of this issue ;)Comment #6
Wim LeersI've been ignoring this because it's filed against 8.x-2.x. Any reason to not just get this in right now?
Comment #7
gabesulliceNope, go for it!
Comment #8
gabesulliceComment #9
Wim LeersRebased #2. No changes at all.
Comment #10
Wim LeersIt looks like this patch horribly breaks things :P
Comment #12
Wim LeersI can't reproduce those failures locally. I thought it might've been a 8.5 vs 8.6 thing. But no, passes on both locally…
So the only thing I can think of to do is to retest, and hope it was a DrupalCI glitch.
Comment #14
Wim LeersTwo times this:
How is this even possible?! I have no idea.
Comment #15
MixologicI kicked off another one of these tests, and whatever this patch is doing is causing the testbots to get themselves into an infinite loop somehow. Im trying to ssh into the machine and its utterly crippled. The bots are completely out of memory (64GB) and swap.
This leads me to believe its not bot related, but patch related.
Comment #16
MixologicI was able to get onto one of the dying bots and get this:
Not much help, but perhaps if you ran this patch against just one test?
Comment #17
Wim LeersI ran this test using both test runners:
IDK what else to do.
Comment #18
Wim LeersOh wait:
ZERO assertions! So this code is somehow breaking PHPUnit. But how!?!
Comment #19
Wim LeersGabe and I think this must be triggering an endless loop.
Rather than fixing this particular problem, I dug deeper, and removed the need for
JsonApiDocumentTopLevelNormalizer
to get injected intoRelationshipItemNormalizer
… which is what madenecessary in the first place. And in doing so, I resolved two
@todo
s!Comment #21
Wim LeersMuch better! Actual test failures instead of breaking testbot :D 🎉
All failures are in
\Drupal\Tests\jsonapi\Kernel\Normalizer\JsonApiDocumentTopLevelNormalizerTest
, but all integration/functional tests are passing. The only possible conclusion is that the kernel test is mocking something incorrectly. Will determine what that is.Comment #22
Wim LeersComment #23
gabesulliceFantastic! What a terribly esoteric bug. I like where we ended up though.
Comment #25
Wim LeersCommitted!
This also enables a simplification in #2948666, see #2948666-32: Remove JSON API's use of $context['cacheable_metadata'].2.