Problem/Motivation

Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 9.

To read more about this effort by the Drupal Association, please read: Accelerating Drupal 9 module and theme readiness with automated patches

Periodically patches will be added to this issue that remove Drupal 9 deprecations. To stop further patches from being posted simply close this issue(any status besides Active, Needs Review or Needs work) or remove the "ProjectUpdateBotD9" tag from the issue.

The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open(status of Active, Needs Review or Needs work) and the "RectorAutoPatches" tag is left on this issue, new patches will be posted periodically if new deprecations are needed.

    As the Drupal Rector project improves and is able to fix more deprecations the patches posted here will cover more of the deprecations in the module.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecations but don't want new automated patches simply leave this issue open but remove the "RectorAutoPatches" from the issue.

    You can use Drupal Rector yourself to make these patches.

    If you want to receive automated patches again simply add back the "RectorAutoPatches" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful they can simply close this issue(any status besides Active, Needs Review or Needs work) and no more automated patches will be posted here.

    If the issue is reopened then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 9 compatibility it may be useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the patch in the comment by Project Update Bot
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear,  use the Infrastructure project issue queue using the component “Bot: Drupal Rector”.

Comments

Project Update Bot created an issue. See original summary.

project update bot’s picture

Status: Active » Needs review
StatusFileSize
new1.56 KB
Patch for Build #1473

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 0.12.3
  2. palantirnet/drupal-rector: 0.5.4
  3. rector/rector-prefixed: dev-master

Debug info: Run #1473

Status: Needs review » Needs work

The last submitted patch, 2: config_overlay.1.x-dev.rector.patch, failed testing. View results

project update bot’s picture

Issue summary: View changes
Issue tags: +Drupal 9 compatibility

Fixing summary

tstoeckler’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new9.82 KB

Here's an updated patch based on #2.

Status: Needs review » Needs work

The last submitted patch, 5: 3140046-5.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

tstoeckler’s picture

Status: Needs work » Needs review
StatusFileSize
new4.85 KB
new13.43 KB

  • tstoeckler committed a2fa449 on 8.x-1.x
    Issue #3140046 by tstoeckler, Project Update Bot: Drupal 9 compatibility
    
tstoeckler’s picture

Title: Automated Drupal Rector fixes » Drupal 9 compatibility
StatusFileSize
new1.46 KB

Alright, committed that. Maybe that will get the D9 tests to run now that the updated version requirement is in dev.

And it seems somewhat in scope of this issue to account for the update of the "other upstream", Config Filter, which allows us to remove a workaround here. Also allowing Config Filter 2.x for now. I've tried that out locally and everything seems to work and as far as I know there aren't supposed to be any API changes.

Status: Needs review » Needs work

The last submitted patch, 9: 3140046-8.patch, failed testing. View results

tstoeckler’s picture

Status: Needs work » Needs review
StatusFileSize
new4.15 KB
new5.29 KB

Hmm... so I guess Config Filter 2.x does cause some issues? Not sure yet, will have to investigate.

This is green on 9.1 locally, let's see if the bot agrees and if it also works on 8.9 and 9.0.

tstoeckler’s picture

StatusFileSize
new1.06 KB
new5.29 KB

So the issue with the failing tests for D9 was that I ran them with MySQL 5.5, but 5.7 is the minimum version in D9.

With 5.7, however, they still fail, as seen above. I missed that #3087130: Profile configuration should be able to depend on optional configuration provided by modules was committed to 9.0 (but not 8.9). Also the version comparison was broken for 9.1.0-dev (because 9.1.0-dev < 9.1.0). This should be green on all three branches, theoretically. Let's see...

  • tstoeckler committed 117b3c9 on 8.x-1.x
    Issue #3140046 by tstoeckler: Fix tests for Drupal 9
    
    Also bumps the...
tstoeckler’s picture

Status: Needs review » Fixed

OK, great!

Opened #3168037: Convert to a storage transformer for the Config Filter issue.

Status: Fixed » Closed (fixed)

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

beunerd’s picture

Hello! Thank you for all the work here. I may be barking up the wrong tree and misunderstanding the purpose of this issue, so please point me in the right direction, but on 9.0.6 with 1.x-dev here I'm running drush cex on a site installed by a profile and all the site's config is getting exported. I'm stripping out the uuid and config hash when I export content to the install profile, not sure if that's a problem. But otherwise, just wondering if there's a piece here that I'm missing (I've been using config_overlay on D8 sites without a problem).

Thanks.

tstoeckler’s picture

Hi @beuner.

First a general note: Issues marked as "closed (fixed)" don't show up in issue listings so comments there are very easy to miss. So, in the future you're better off creating a new issue. If you're not exactly sure if there's a bug or not just mark the ticket as "Support request", but that ensures that the ticket is visible.

Regarding your actual problem: That is very strange indeed. Since this issue was fixed the same tests run on Drupal 8 and Drupal 9 and they ensure that the module works as expected (and works the same on both versions). So no, you're not doing anything wrong, as far as I can tell. Upgrading from D8 to D9 should not really make a difference. So if you cannot track down the issue, feel free to open a ticket with some steps to reproduce, so that I can try to help.

beunerd’s picture

@tstoeckler - Thank you for the guidance! that's very helpful, and I'll follow it going forward.