Closed (fixed)
Project:
Typogrify
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2020 at 16:46 UTC
Updated:
30 Apr 2020 at 20:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
benjifisherD9 compatibility was on my to-do list, but of course I am happy to have some help. I will review this.
We can fix the test failures as part of #3124616: Fix coding standards in Typogrify.
Comment #4
benjifisher@Wim Leers, thanks again for working on this issue.
I reviewed the change to the
.info.ymlfile. LGTMI tested with Drupal 9.0.0-beta2 and the Umami installation profile. Without the patch from #2, I get errors from various
drushcommands:si,cr,en typogrify. I also get errors when visiting some admin pages:/en/admin/modulesand/en/admin/config/development/performance.After applying the patch, those errors go away and I can enable the module. I did a basic test of functionality: add the Typogrify filter to the Basic HTML format and create a node with "Basic HTML" in a text field. As expected, I get the markup
Basic <span class="caps">HTML</span>.I am setting the status to RTBC, but I will not fix this issue (commit the patch) yet because then the dev version will not work with Drupal 8.7, which is still supported. I will release another alpha version today, and I plan to make a full release very soon. I will target this issue for 8.x-1.1.
Comment #5
wim leersWell, considering the patch size, it can hardly be considered "working" 😅
Crucial information I forgot to mention: I did more than change trivial details in the
*.info.ymlfile. I also tried the patch on D9. I can confirm it works well. (I'm using it on the current D7wimleers.comand in porting that to D9 I wanted to keep this lovely filter 😊.)Comment #6
benjifisherI installed Upgrade Status and checked the Typogrify module. There were three warnings. I will deal with one on #3124616: Fix coding standards in Typogrify; one is already fixed by this patch; but the third should also be fixed here:
I am setting the status back to NW.
BTW, even if the patch is easy, recognizing the need, creating the issue, and so on are all work that needs to be done. It really is appreciated!
Comment #7
neslee canil pintoAdd in composer.json has well
Comment #8
benjifisherThanks for helping out!
Let's use the same version requirement in both places. But first, I looked into the composer.json requirement some more.
We do not need to update composer.json
After some discussion on the #d9readiness channel in Slack, we agreed that the Upgrade Status module is wrong in generating that warning, and I added #3126949: Missing requirement in composer.json should not generate a warning.
Is it still a good idea?
Argument in favor:
Arguments against:
composer require drupal/typogrifyoutside the context of a Drupal site.drupal/corein the guide Add a composer.json file.Should we remove
core: 8.xfrom the.info.ymlfile?In my initial test with Drupal 9.0.0-beta2 (see #4) it seemed that we need to remove the
corekey . But today I re-tested, and I was able to install 9.0.0-beta2 from scratch or upgrade from 8.9.x, so maybe something else was going in in my initial test. If we keepcore: 8.xand use the version constraint from #7, then I will be able to commit this patch before releasing 8.1.0.Comment #9
neslee canil pintoWe have to remove core key if we specify drupal 8.8
Comment #10
benjifisherWhy is that? According to https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-... and the change record https://www.drupal.org/node/3070687, it is the other way around: if we remove
core: 8.x, then we have to specify^8.8(or maybe just^8.7.7).I tested with 8.9.x and 9.0.0-beta2 without removing the
corekey, and I was able to install the module. Should I re-test?Comment #11
neslee canil pintoYes please, because its not best practice to have both in info.yml if you specify 8.8
Comment #12
benjifisherIn my initial tests (see #4) I had
core_version_requirement: ^8.8 || ^9, and in my re-test (see #8) I hadcore_version_requirement: ^8 || ^9. I tried again with the original version constraint ( the one in the patch from #2) and got the error messageThis is consistent with #11. Looking in
core/lib/Drupal/Core/Extension/InfoParserDynamic.php, I see that this comes from the linesI guess that means we have two options:
core: 8.xand use a version constraint like^8 || ^9.core: 8.xand use a version constraint like^8.7.7 || ^9or^8.8 || ^9.In #8, I suggested Option (1). Are you saying that you prefer Option (2)?
I will update https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-....
Comment #13
benjifisherNo, I will not edit that page. It already says,
Comment #14
wim leersThe two options in #12 are correct.
If there's nothing preventing from being compatible with both Drupal 9 and Drupal 8 simultaneously, there's no reason to choose option 2. Option 1 is more inclusive then.
Comment #15
benjifisherHere is a patch that implements Option 1 from #12. I am not going to bother with an interdiff.
Comment #16
neslee canil pintoComment #18
benjifisherThanks all for working on this!
It is funny how a 1-line patch generated so much discussion. The bigger change is oon the Upgrade Status module: #3126949: Missing requirement in composer.json should not generate a warning. I hope that saves other maintainers from going through the same discussion (or at least part of it).