Problem/Motivation

drupal-check web/modules/contrib/taxonomy_access_fix 
 9/9 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


                                                                                
 [OK] No errors                                                                 
                                                                                

Remaining tasks

  • Add core_version_requirement to the .info.yml file.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue tags: +Drupal 9 compatibility
akshay_d’s picture

Status: Active » Needs review
StatusFileSize
new13.85 KB

Updated and solved the coding standards, please review

jenlampton’s picture

?option to the composer.json file in this project you can get a nice little Compatible with Drupal 9 badge in the Project information section on the module page.

Screenshot of the Project information section with Compatible with Drupal 9 highlighted

Below is a code sample from a module that has the badge.

"require": {
        "php": "^7.1",
       "drupal/core": "^8 || ^9"
  },

It also looks like it may possible to get the badge by adding the 'core_version_requirement' key in the module's info.yml file, which, in turn, will add the version to the require section of composer.json. Example follows.

core_version_requirement: ^8 || ^9

Do you want to include this change in the patch here or open a separate issue?

akshay_d’s picture

StatusFileSize
new14.22 KB

Sorry for the delay
updated the key requirements for the module, please review the patch

eblue’s picture

I wasn't able to apply this patch. The problem seems to be the VocabularyAccessTest.php changes:

--- tests/src/Functional/VocabularyAccessTest.php
+++ tests/src/Functional/VocabularyAccessTest.php
@@ -146,10 +146,10 @@ class VocabularyAccessTest extends TaxonomyTestBase {
     $this->drupalGet('admin/structure/taxonomy');
     $assert_session->statusCodeEquals(200);
 
-    $assert_session->pageTextNotContains(t('Add vocabulary'));
+    $assert_session->pageTextNotContains($this->t('Add vocabulary'));
     $this->assertNoLinkByEndOfHref(Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString());
     $this->assertNoSortableTable(FALSE);
-    $assert_session->pageTextContains(t('No vocabularies available.'));
+    $assert_session->pageTextContains($this->t('No vocabularies available.'));
 
     foreach ($this->vocabularies as $delta => $vocabulary) {
       $assert_session->pageTextNotContains($vocabulary->label());
@@ -264,7 +264,7 @@ class VocabularyAccessTest extends TaxonomyTestBase {
     $this->drupalGet('admin/structure/taxonomy');
     $assert_session->statusCodeEquals(200);
 
-    $assert_session->pageTextNotContains(t('Add vocabulary'));
+    $assert_session->pageTextNotContains($this->t('Add vocabulary'));
     $this->assertNoLinkByEndOfHref(Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString());
     $this->assertNoSortableTable(FALSE);
jeroent’s picture

Issue summary: View changes
StatusFileSize
new4.58 KB

Patch attached removes the calls to deprecated functions and adds the core_version_requirement option.

@akshay_d,

You made some nice improvements to the coding standards of this module, but I would suggest creating a separate issue for that.

jeroent’s picture

I contacted @pifagor and FeyP and they want some extra reviews to check if this patch is working.

So if someone could review this and mark this patch as RTBC when working, that would be great.

jungle’s picture

+++ b/tests/src/Functional/TermAccessTest.php
@@ -125,12 +125,12 @@ class TermAccessTest extends OriginalTermAccessTest {
+      $this->assertSession()->pageTextContains(t('Delete'));
...
+      $this->assertSession()->pageTextContains(t('Delete'));

@@ -232,7 +232,7 @@ class TermAccessTest extends OriginalTermAccessTest {
+        $this->assertSession()->pageTextNotContains(t('Delete'));

Using t() is unnecessary here. otherwise, it looks good. See #3133726: [meta] Remove usage of t() in tests not testing translation

jeroent’s picture

StatusFileSize
new4.57 KB
new1.7 KB

Thanks for the fast review @jungle!

jungle’s picture

Issue tags: +Needs manual testing

Thanks @JeroenT!

If someone could check it with the upgrade_status module https://www.drupal.org/project/upgrade_status and attach a screenshot to prove that no more left to fix. Then it's RTBC to me.

jeroent’s picture

Issue tags: -Needs manual testing
StatusFileSize
new67.61 KB
new66.76 KB

Before:

After:

jungle’s picture

Status: Needs review » Reviewed & tested by the community

@JeroenT, Much appreciated for the manual testing. per #12, it's an one line-change --- adding the core_version_requirement key, to get the thing done.

The other improvements are out of scope here but they are all good to have. So this is RTBC to me.

Thanks!

jeroent’s picture

feyp’s picture

Assigned: Unassigned » feyp
Priority: Normal » Critical
Parent issue: » #3100481: Plan for Taxonomy Access Fix 8.x-3.0 release

Thank you so much everyone for working on this. I'm really sorry that I've not been able to create a Drupal 9 release in time. Due to some really unexpected circumstances, I've been away since January and it will still be some time until I will be able to fully resume contributions at the usual level. For now, I can resume work on a very limited basis and Taxonomy Access Fix will be at the top of my list due to the number of users affected, but there might still be some delays. So please bear with me, if you don't always receive a timely response. I'm reading all the comments and eventually I will get back to you. It might just take longer than usual. That being out of the way, let's get back to the issue at hand.

This is of course looking good, so let's add this to 8.x-3.0.

Just a very quick note regarding #13: At least some of the other changes are definitely in scope, because the tests do not run on 9.0 without these changes (e.g. declaring the default theme) and I just won't commit a Drupal 9 compatibility declaration without sufficient test coverage ;).

I'm also escalating this to critical, since 9.0 has been released and we really should have made these changes already during beta or rc.

I'll commit this shortly and then prepare a new release. Thanks again everyone for your help and your patience.

  • FeyP committed 434f64e on 8.x-3.x authored by JeroenT
    Issue #3112941 by JeroenT, akshay_d, jungle, jenlampton, DamienMcKenna,...
feyp’s picture

Assigned: feyp » Unassigned
Status: Reviewed & tested by the community » Fixed

Committed. I'll let you know, when the new release will be available. Thanks.

feyp’s picture

I just released 8.x-3.0 and 8.x-2.8 (which contains an upgrade path to 8.x-3.x, if you're still on 8.x-2.x).

pifagor’s picture

Thanks

pifagor’s picture

Issue tags: -Drupal 9 compatibility

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.