Hi, First all, this module is ready for Drupal9 compatibility?
After to run drupal-check reported:
drupal-check fences
6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Thank's
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3101948-20.patch | 4.25 KB | benjifisher |
| #20 | interdiff-3101948-19-20.txt | 251 bytes | benjifisher |
| #19 | 3101948-19.patch | 4.22 KB | benjifisher |
| #19 | interdiff-3101948-5-19.txt | 2.21 KB | benjifisher |
| #5 | 3101948-5.patch | 2.14 KB | benjifisher |
Comments
Comment #2
matroskeenIt seems all we need is core_version_requirement property in *.info.yml
Comment #3
benjifisherThe patch looks right. I tested by installing on both Drupal 8.9 and 9.0. It works in both.
I hope to have this module available in Drupal 9.
Comment #4
kristen polThanks for testing! I checked the deprecations with the patch using the Upgrade Status module and there are some listed so moving this back to "Needs work". Maybe those should be fixed in a follow up issue though?
Comment #5
benjifisher__construct()method. See snippet below.Drupal\Tests\FunctionalJavascriptTests, butDrupal\FunctionalJavascriptTestsis correct.I did find two other problems, and the attached patch corrects them:
$defaultThemeproperty: since the test checks core markup, I usedstable. See the change record.Drupal\Tests\fences\Functionalinstead ofDrupal\Tests\fences\FunctionalJavascript. Before and after the patch, the namespace matches the directory.From
TagManager.php:I ran the kernel test in both Drupal 8.9.x and 9.1.x. It passed using both the patch in #2 and the attached patch. The attached patch does make one change that affects the kernel test: it moves the trait from
tests/src/Kerneltotests/src/Traits, following PHPUnit file structure, namespace, and required metadataI have not set up my environment to run javascript tests locally, but the testbot should be able to run it.
Running the kernel test on Drupal 9.1.x did generate one deprecation notice: before Drupal 10.0.0, we will have to declare the return type (void) for the
setUp()method.Comment #7
benjifisherNo good deed goes unpunished. Now that the functional JavaScript test is running, it fails.
Since I cannot run the test locally, I am adding a debug line even though I know this version of the test will fail.
Comment #8
benjifisherMore of the same.
Comment #9
benjifisheroops.
Comment #10
benjifisherMore of the same.
Comment #11
benjifisherMaybe, instead of trying to figure out where in the process all those tags are being stripped, I should search for elements by CSS selector and test their text.
Comment #12
benjifisherMore of the same.
Comment #13
benjifisherAnd more.
Comment #14
benjifisherMore of the same.
Comment #15
benjifisherSometimes it is a good idea to take a break and come back later.
Still trying to debug the tests.
Comment #16
benjifisherProgress. With a few more iterations, I should be able to fix the test.
Comment #17
benjifisherMore of the same.
Comment #18
benjifisherMore of the same.
Comment #19
benjifisherThis version of the functional JavaScript test does not depend much on core markup. I think that is an advantage over the existing test. Mostly it just checks for the HTML elements and classes added by Fences.
I am hiding all of my test patches and providing an interdiff comparing to the patch in #5.
I think that fixing the tests, as I have done, is outside the original scope of the issue. But some things, like providing the
$defaultThemeproperty, are in scope, so defining what is in and out of scope is challenging. I suggest we go ahead and commit the patch as is, or with whatever tweaks are suggested in further reviews.Comment #20
benjifisherWhen I test with Drupal 9, the testbot reports,
I think that comes from the dependencies in the .info.yml file. If we are going to require 8.7, we might as well require 8.7.7, since then we no longer need the
core: 8.xline.It looks like a bug that
is translated into
drupal/core ^8.7.0, but maybe that is not exactly what is going on.Comment #21
benjifisherI asked on the #d9readiness channel, and the test failure is expected: the Drupal core requirement comes from the branch, not the patch.
IMO either the patch in #19 or the patch in #20 is good to go, depending on whether the maintainers want to support 8.7.0 through 8.7.6.
Comment #22
kristen polThanks for the patches! There are a lot! :) I'm not going to be able to fully review but let me review as best I can.
1) Regarding #5:
a) Re 5.3, I checked in with Gábor Hojtsy about this in Slack and he said that the autoload errors are often wrong and can probably be ignored.
b) Re 5.1, maybe this is the same as the autoload false errors.
c) Re 5.2.1 (Missing $defaultTheme property), good catch.
d) Re 5.2.2 (FunctionalJavascript), looks like this is just changing
FunctionaltoFunctionalJavascriptwhich doesn't seem required but just cleanup. Searching forFunctionalafter patching only showsFunctionalJavascriptso all instances were changed.2) Regarding #19 vs #20:
I don't know if the maintainers will want to support
^8or^8.7.7so having both options is good.3) As for fixing the test, I guess the test was failing so fixing it here makes sense. I'm not sure that is the best way to fix it so I'll leave that for someone else to chime in on.
4) Patch from both #19 and #20 apply cleanly.
5) Regarding moving
StripWhitespaceTraitfromKerneltoTraits. I assume that is not required but just cleanup. I searched the code forStripWhitespaceTraitand see all the namespaces changed after patching.6) What's the best way to manually test
Fencesquickly?7) Leaving "Needs review" so someone can take a look at the test restructuring.
Comment #23
benjifisherIt is safe to ignore the patches in Comments #7 through #18. That is why I hid them. I am not set up to run functional JavaScript tests locally, so the only way I can debug those tests is by uploading patches for the testbot to try.
Maybe that means we do not need a
usestatement at the top of the file if the trait is in the right namespace. I did not test that. But I took that to mean thattests/src/Traitsis the expected location for traits in tests.<ul>as the Field Tag and<li>as the Field Item Tag. Remember to use both Update and Save buttons.Comment #24
kristen polRegarding 23.4, sure, they applied cleanly right then. For core or projects with lots of commits, this can change quickly so I always check it and report it. :)
Comment #26
sam152 commentedI'm fine with dropping support for 8.7.0 - 8.7.6, so #20 looks great to me.
Thanks all.
Comment #28
anybodyHi Sam152,
I guess a new rc2 release would make sense then to make it usable under Drupal 9?