Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects

Periodically patches will be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted simply close this issue (any status besides Active, Needs review or Needs work) or remove the "ProjectUpdateBotD10" 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 "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

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

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD10" tag from the issue.

    You can use Drupal Rector yourself to make these patches.

    If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can 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 10 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 Drupal 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”.

Issue fork features-3297177

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Project Update Bot created an issue. See original summary.

Project Update Bot’s picture

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.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.13.0, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.

Debug info

Bot run #139

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.24
  2. palantirnet/drupal-rector: 0.13.0

Status: Needs review » Needs work

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

nedjo’s picture

Fixing up problems with checkboxChecked and checkboxNotChecked.

Status: Needs review » Needs work

The last submitted patch, 4: features-d10-3297177-4.patch, failed testing. View results

  • nedjo committed f490ef7 on 5.0.x
    Issue #3297177 by Project Update Bot, nedjo: Drupal 10 compatibility...
nedjo’s picture

Status: Needs work » Active
Kristen Pol’s picture

Thank you for making a dev branch compatible with Drupal 10! For the rest of the community, this issue is marked Active in case the bot has more patches to provide later. Once the maintainers feel ready, they will make a release from the dev branch.

Project Update Bot’s picture

Status: Active » Needs review
FileSize
18.75 KB
2.46 KB

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.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.13.1, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.

Debug info

Bot run #145

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.25
  2. palantirnet/drupal-rector: 0.13.1
Spleshka’s picture

Assigned: Unassigned » Spleshka
Issue tags: +Drupal 10 porting day

I'll work on this issue as a part of Drupal 10 Global Porting Day.

Spleshka’s picture

I've completed with Drupal 10 compatibility, attaching the patch. Several comments:

  • The main issue was getting rid of deprecated drupal_get_filename() in FeaturesInstallStorage. I read the comment that it may be removed when #2186491: [meta] D8 Extension System: Discovery/Listing/Info is done, but until then we had to replace it with ExtensionPathResolver::getPathname() and change 3 files to make it happen.
  • Upgrade Status module threw warnings about using of deprecated drush_log() in features.drush8.inc file. Given that Features require Drupal 9.4 as its minimal version and drush 8 is not compatible with Drupal 9, I've decided to get rid of the file completely. It's a good legacy clean-up and we make Upgrade Status happy.
  • Replaced public static $modules in tests with protected, due to https://www.drupal.org/node/2909426
  • Replaced deprecated assertArrayEquals() in tests with assertEquals(). In some cases I had to change the order of arguments, as it was not following the expected format ($expected, $actual)

After the fixes I performed the following tests:

  • Locally run a combination of drush cr, drush updb, drush deploy to make sure that routine drush commands don't trigger errors
  • Created a new feature, reviewed all feature pages in admin UI. All works as expected
Spleshka’s picture

I've decided to run tests locally and turns out they have some issues as well. I've fixed all issues related to the code changes.

Spleshka’s picture

Tests seem to be broken after the recent changes in the module (unrelated to this issue), I've created a separate issue #3306198: Broken tests on 5.0.x.

Spleshka’s picture

Assigned: Spleshka » Unassigned

Unassigning from myself so that anyone can do a review.

Status: Needs review » Needs work

The last submitted patch, 12: features-drupal-10-compatibility-3297177-12.patch, failed testing. View results

Spleshka’s picture

Status: Needs work » Needs review

Let's wait the bot to re-test.

Spleshka’s picture

Looks like there are some issues with tests and Drupal 10. I'll investigate.

Spleshka’s picture

Status: Needs review » Needs work
Spleshka’s picture

Found another small issue with sessions when running tests on D10. Now it all should be good.

Spleshka’s picture

nedjo’s picture

@Spleshka: thanks for your work on this, looking great.

The default test for issues was against core 9.4.x. I've switched it to be against core 10.0.x so we can see how this does.

  • nedjo committed 8a34ef8 on 5.0.x
    Issue #3297177 by Spleshka, Project Update Bot, nedjo: Automated Drupal...
nedjo’s picture

Status: Needs review » Active

Applied, thanks!

Nice catch on that odd quirk with the session. Great to have tests passing again against 10.0.x.

Setting back to "Active" so we can get future update bot fixes.

Kristen Pol’s picture

I just wanted to say that the comments on this issue are great! Thanks for the very explicit and well thought out information for each step. Perhaps we could add this to the documentation as an example of someone working through various problems on a porting issue. I’m also glad this went back to *Active* for the bot so people hopefully won’t do further reviews until another bot patch happens.

mark_fullmer’s picture

Thanks for the work on this! With Drupal 10 officially released on 14 December, I suggest a tag from the 5.x branch be released. If there are considerations of further API changes coming, it could be an alpha release, of course, but some sort of release would encourage testing/adoption with D10.

mark_fullmer’s picture

Priority: Normal » Major

Checking in with the module maintainers: with this already committed to the 5.0.x branch, would it be possible to get a new release tagged so that sites can require this via the normal Composer methods? Thanks in advance!

podarok’s picture

You can add https://www.drupal.org/project/features/releases/5.0.x-dev release to composer and test @mark_fullmer

catapipper’s picture

Any word on when a release will be made for Drupal 10 compliance? I've run the dev release and it seems to be working perfectly. Unfortunately due to security policies at the office we cannot run dev versions and need a stable release. This is one of the last modules we are waiting on to upgrade to Drupal 10 and would really appreciate a stable release when the maintainers get a chance.

mark_fullmer’s picture

Status: Active » Reviewed & tested by the community

I've run the dev release and it seems to be working perfectly. Unfortunately due to security policies at the office we cannot run dev versions and need a stable release. This is one of the last modules we are waiting on to upgrade to Drupal 10 and would really appreciate a stable release when the maintainers get a chance.

+1 to all of this:

- Our team has also tested the 5.0.x-dev branch with Drupal 10 and not encountered any issues
- For policy reasons, we also cannot require branches of projects in our stable releases
- This is also one of the last modules we are waiting on for the Drupal 10 upgrade

Marking as RTBC to reflect two community members vouching that it is functionally compatible with D10.

gravelpot’s picture

Hello, I'm here to add one more +1 in support of a D10-compatible release.

An alpha or beta release would be fine, just something other than a dev build, since we have recently run into a technical limitation using a dev
build based on a specific commit hash. We found that you can't rely on getting the same thing every time you do a Composer build without modifying the site's root `composer.json` file, which isn't an option for us with the architecture of our Pantheon custom upstream.

We are on schedule to upgrade ~100 sites from D9 to D10 in May, and this is one of the last remaining contrib modules in our standard distribution that does not have a D10 compatible release. I appreciate all the fine work folks are doing here, and hope this can get pushed over the finish line soon. Please let us know if there is any further labor that can be contributed to the effort in specific issues.

mmarler’s picture

Adding a +1 here too. My team will be upgrading sites to Drupal 10 on May 23rd, and would love to have a stable, Drupal 10 compatible release for the Features module. Thanks for all the work on this!

nedjo’s picture

Thanks for your notes. While I am currently the most active maintainer in Features for Drupal 9, I am not the project owner. I'm not planning to cut a D10 compatible stable release as I am transitioning out of Drupal and therefore won't be maintaining through the new release cycle. It may be time for some of the steps outlined in the documentation page Finding a new project owner or new maintainers/co-maintainers.

mark_fullmer’s picture

Thanks for clarifying your current relationship to maintainership, nedjo, and thanks for all your work up till now.

One potential win-win would be for you to go ahead and tag a Drupal 10-compatible release from what is current in the 5.0.x branch, and simultaneously mark the project as not actively supported. That would allow folks to composer-require a D10-compatible release and provide patches, as needed, in the short term, to fix any incompatibilities, while not creating an expectation that you provide maintenance during the Drupal 10 release cycle.

Long term, of course, folks should step up to follow the steps in offering to co-maintain this project (https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...).

But a tagged release would be very beneficial in un-blocking people using this site who are trying to update to Drupal 10.

nedjo’s picture

@mark_fullmer, okay, I've gone ahead and created a 5.0.0-alpha1 release and linked to this conversation in the release notes. For now, the 5.0.0 branch is marked supported but not recommended.

mark_fullmer’s picture

Status: Reviewed & tested by the community » Fixed

Wonderful, @nedjo! The Drupal community thanks you. I'll talk with our team about what we can do to help maintain the Features module going forward.

Status: Fixed » Closed (fixed)

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

Foxy-vikvik made their first commit to this issue’s fork.

Dave Reid’s picture

Do we know what the long-term roadmap is for the 5.x version is? There's currently a note on the https://www.drupal.org/project/features/releases/5.0.0-alpha1 release:

Updating to releases on this branch is not yet recommended, pending confirmation of a plan for ongoing maintenance.

Has this been addressed in any way? Is there a roadmap? Are there major changes we should be aware of in the 5.x branch either currently or incoming, or should this just be a stable release on the 3.x branch?

Dave Reid’s picture

Version: 5.0.x-dev » 8.x-3.x-dev

I'm not really seeing any major differences between the 8.x-3.x branch and the 5.x branch aside from the Drupal 10 changes, would we be opposed to just merging this into 3.x and tagging a new stable release there?

Dave Reid’s picture

Dave Reid’s picture

Just a heads up for everyone, we are talking about plans to merge the current 5.x branch into the 8.x-3.x branch and tag a stable release, and then probably get rid of the 5.x branch for now. I think it was only really used for this code and doesn't contain any major changes aside from keeping up to date with Drupal core major versions, so there's no reason for a separate branch really. Unless someone really needs a Drupal 8-only compatible branch, but Drupal 8 is unsupported right now anyway, so it's a moot point.