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.
Testing a fake patch to see if tests run against Drupal 9.
Comment | File | Size | Author |
---|---|---|---|
#28 | interdiff-3109693-24-28.txt | 727 bytes | phenaproxima |
#28 | 3109693-28.patch | 7.72 KB | phenaproxima |
#24 | 3109693-24.patch | 6.91 KB | phenaproxima |
#23 | 3109693-23.patch | 5.86 KB | phenaproxima |
#20 | 3109693-19.patch | 6.98 KB | phenaproxima |
Comments
Comment #2
katherinedComment #3
Wim LeersA lot of
See
\Drupal\Core\Extension\InfoParserDynamic::parse()
in Drupal core:Apparently this is not working correctly!?
Ah, no, there's a problem in the test module:
This should just remove the
core
key altogether 😄Comment #4
katherinedComment #5
phenaproximaDebugged the failures with @katherined. The good news is, they looked a lot worse than they actually were.
This should fix most of them, with the notable exception of the update path test. Due to the removal of all Drupal 8 update path testing materials in Drupal 9, we need to wait until Drupal 8.8 is the minimum supported version of core before we can fix that test.
Comment #6
phenaproximaLet's see how this does. If it passes, it means we cannot commit it until Drupal 8.8 is the oldest supported version of core.
Comment #7
phenaproximaStarting from the clean slate of https://www.drupal.org/pift-ci-job/1590206 ...let's see how many errors this fixes.
Comment #8
phenaproximaA quick experiment -- let's see if we can't have our cake and eat it too. If we can, then I can commit this right now.
Comment #11
phenaproximaWhoops, I meant theme_installer. Not theme_install.
Comment #13
BerdirThat check doesn't work on 8.8/8.9 because both files exist. You need a less fancy version, I'd just put 8.8 in there and then after that you check if it does _not_ exist and if so, go back to 8.0
Comment #14
BerdirThat said, the trusted callback stuff will either require 8.8 anyway or ugly hacks to dynamically define the interface.
I think at this point is pretty much given that the first scheduled 9.0 date won't happen, there's just too much left to do this week, so that also means we have more time until we have to drop 8.7 support, so my recommendation, as usual, would be to just go for ^8.8, do it cleanly and then wait for a good time to drop 8.7 :)
Comment #15
phenaproximaThanks, @Berdir. Let's see how this does -- I just dropped backwards compatibility.
Comment #18
phenaproximaOkay, that took several hours of increasing frustration and confusion, but then with @oknate's invaluable -- dare I say heroic? -- debugging help, we realized that the test is breaking because, when we implement TrustedCallbackInterface on EntityReferenceFieldFormatter, the X-Drupal-Assertion header goes away, changing the size of the transfer.
That raises the question: why do we even care how much actual data was transferred over the wire? Don't we just care that it's non-zero? This seems plausible because, a few lines later, we specifically assert that a second preview request transferred zero bytes (since it's cached on the client side). Therefore, in theory, we should only need to assert that the first preview request transfers some data. Putting constraints on how much data it was, makes the test more brittle and doesn't seem to add much.
Comment #19
Wim LeersYes, we don't care about the specific number of bytes transfered. We care that it's non-zero vs zero. I was just being cautious about it not accepting a broken response with like a PHP fatal error. But … it doesn't materially matter — non-zero vs zero is what materially matters. (Although a one-byte response could never contain a meaningful preview, that's not the scope of this particular test, so it doesn't materially matter.)
+1 to this change :)
We definitely don't want this to get committed 😅
Comment #20
phenaproximaFixed!
Comment #21
phenaproximaCrediting Wim and Berdir for their help.
Comment #22
Wim LeersSorry, one more:
Test modules don't need to have this specified. You can just delete these lines.
Comment #23
phenaproximaDone.
Comment #24
phenaproximaOn another reading, I realized that you wanted me to delete the
core: 8.x
lines as well. So that's done here.Comment #25
Berdirtest modules not needing this is only in core since 8.8.2, so you'd need to depend on that in the main file :) That said, you would need to set it to at least ^8.8 with the current patch anyway.
Comment #26
Wim LeersExactly :)
Comment #27
BerdirYeah, but the main .info.yml currently contains "core_version_requirement: ^8.7.7 || ^9", which would allow to install on 8.7 and then fatal on the test modules.
And it also contains a unecessary >=8.4 requirement that could be cleaned up.
Comment #28
phenaproximaGood points. Fixed here.
Comment #29
Wim LeersComment #31
phenaproximaCommitted and pushed to 8.x-1.x. Thanks, everyone!