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.
We've accumulated a fair number of BC layers in the hal.module
component. In this issue, we maintain an up-to-date patch that removes all BC layers, which allows us to track how much of a difference this would make.
Comment | File | Size | Author |
---|---|---|---|
#30 | 3034062-28-interdiff.txt | 600 bytes | Berdir |
#30 | 3034062-28.patch | 24.26 KB | Berdir |
#28 | 3034062-27-interdiff.txt | 593 bytes | Berdir |
#28 | 3034062-27.patch | 23.67 KB | Berdir |
#25 | 3034062-25-interdiff.txt | 9.81 KB | Berdir |
Comments
Comment #2
Wim LeersCommit
c8dc57eedea3fd34de067098ca2ee36e6c459245
.Comment #3
Wim LeersTitle was wrong. And patch was rolled without
--binary
.Comment #4
jibranDo we still want to keep HAL around after JSON:API is included in core? I vote for removal from D9.
Comment #5
Wim LeersComment #6
e0ipso#4 @jibran I agree! Can you help me push #3049856: [policy] Mark HAL module as deprecated in D9 so it can be removed in D10 forward.
Comment #8
Wim LeersComment #9
Wim LeersThis is blocked on #2893804: Remove rest.module BC layers.
Comment #10
BerdirNote: Should also remove all left-over references to hal_update_8501() and possibly others.
Comment #11
Wim Leers#10: 👍, thanks! :)
Comment #12
Stefdewa CreditAttribution: Stefdewa at Calibrate commentedPatch from #3 didn't apply anymore, created a new one from scratch after applying patch from #2893804-91: Remove rest.module BC layers .
Comment #13
Wim LeersI compared #3 with #12. Differences:
hal.install
is not being modified anymore. #3087644: Remove Drupal 8 updates up to and including 88** already did all of that for us!drupal-8.hal-hal_update_8301.php
is not being removed anymore. #3087644: Remove Drupal 8 updates up to and including 88** already did all of that for us!NormalizerBase
that I missed 👍core/modules/hal/tests/src/Functional/EntityResource
that I missed 👍alterDeprecated()
calls inRelationLinkManager
andTypeLinkManager
that I missedthat were added since #3 was created 👍This is completely ready if it passes tests, but we'll need to wait for #2893804: Remove rest.module BC layers to land to know that for sure!
Thanks for getting this patch into shape and highly likely insta-RTBC, @Stefdewa! Marking postponed for now, but as soon as #2893804 lands, this should be re-tested and marked RTBC :) 🚢🚢
Comment #14
Berdirthis class is not deprecated anymore, we can't remove it, only the first method that is marked as deprecated.
What we do need is remove this configuration, the schema for it and add an update function that removes it on existing sites. Basically the same dance as in the rest issue.
Leaving at postponed as we'll likely need to reuse the fixture we have in the rest issue and it will be easier to do that once that is committed.
Comment #15
Wim LeersYou're right, good catch! Our tests would (presumably) have caught this prior to commit fortunately. 🤞
Comment #16
Wim Leers#2893804: Remove rest.module BC layers landed 5 mins ago! Testing #14…
Comment #18
BerdirYes, failing as expected :)
Comment #19
Wim LeersMost of the failures are due to the remark that @Berdir posted in #14, so yay, that confirms my statement that tests should catch that bug! 🥳
Also,
FileHalJsonAnonTest::testGetBcUriField()
should be removed.Those things seem simple enough for a novice to do :)
Comment #20
DamienMcKennaTagging as a requirement for Drupal 9.0-beta1.
Comment #21
sokru CreditAttribution: sokru as a volunteer commentedReroll solving #14 and #19. However not sure should we extend
rest-module-installed.php
fixture or not. Created a separatehal-module-installed.php
fixture.Comment #23
Wim LeersLooks like most if not all of the remaining failures are about the test coverage asserting that the
config:hal.settings
cache tag is present, but this patch is removing thehal.settings
configuration, so that cache tag should no longer appear. In other words, the tests' expectations need to be updated :)Comment #24
BerdirWorking on this.
Comment #25
BerdirSo I learned something interesting while working on #3095333: Extend filled database dump with new stable modules and content for them, and that is that the filled dump already has hal+serialization+rest enabled, so we don't actually need to fake anything here, we just need to use the filled dumps. That does make the test quite a bit slower, but it also means fewer fixtures and workarounds to maintain.
I updated HalSettingsDeletionUpdateTest to use that, and it passes now. Maybe better to do the same with the rest test in a separate issue? That said, the test actually still tested the rest config *and* we removed too much here, we still need the link domain setting, so this update must only remove the specific key. Cleaned that up.
Other fixes include removing the cache tag where it is no longer needed and re-adding the file entity normalizer service. Also still quite a few tests covering removed functionality, that was deprecated a long time ago, so some of these are a bit tricky, like removing array keys in return values. But, this has also been done very long ago and is unlikely to be used.
interdiff is weird in a few places due to re-adding removed files and then removing parts.
Comment #26
BerdirOne thing: the update test passes now without @group legacy as well, I'm not sure if we should keep that or not, as right now it makes sense to not have it to make sure we have no deprecations left, but sooner or later, we'll add a system.module update or so that will trigger one and then all tests would need to be updated.
I kept it here but removed in the hal issue IIRC, sorry about the inconsistency :p
Comment #27
BerdirNote: The tests failed because I removed the @group legacy from that test and now it has none left.
So, per https://drupal.slack.com/archives/C1BMUQ9U6/p1580561124478000, we should add that back *and* also make sure we have a @group hal there and then it should run the tests.
Won't have time for that during the day.
Comment #28
BerdirNo volunteers it seems :)
Comment #30
BerdirThis should fix the remaining media tests.
Although, I do wonder whether not all hal+json resources should always still include config:hal.settings cache taq anyway because the logic in \Drupal\hal\LinkManager\LinkManagerBase::getLinkDomain() depends on it, seems like a classic cacheability-only-added-in-positive-case bug. But that's not really related and should be fixed in a separate issue.
Comment #31
Wim Leers+1 — and this already has an issue: #2928882: HAL links are broken if diffferent domains, protocols or ports are used in multisite or multi-domain setup 🙂
Comment #33
catchCommitted 8c2f0de and pushed to 9.0.x. Thanks!