Problem/Motivation
Drupal 11.0.0 will be released later this year. Let's make the Features module Drupal 11 compatible. I've performed a static code analysis of work involved for Drupal 11 compatibility. In addition, the GitLab CI should probably add NEXT MAJOR to start running tests against Drupal 11. Additionally, it was proposed to drop support for older versions of Drupal in #3407087: Drop Drupal 9 support, so I've included that consideration, below.
Auditor checklist
- [ ] Deprecated Drupal code is remediated
- [ ] Deprecated PHP code is remediated
- [ ] Custom code is compatible with jQuery 4
- [ ] Custom code coreversionrequirement indicates Drupal 11 compatibility
References
- Drupal 10 deprecations: https://dev.acquia.com/drupal10/deprecation_status/errors
- jQuery 4 deprecations: https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/
Composer
- [ ] This module has a composer.json file. Manually review it for Drupal 11 compatibility, such as external requirements, core version constraints, and PHP version constraints
PHPStan Audit of Drupal deprecations
[OK] No errors
Drupal-Rector Audit of Drupal deprecations
[OK] Rector is done!
Audit of deprecated PHP <8.3 calls
If no errors are listed below, php-compatibility did not find any.
............................................................ 60 / 69 (87%) ......... 69 / 69 (100%) Time: 817ms; Memory: 18MB
jQuery 4 compatibility: List of all custom JavaScript files
Any files listed below should be reviewed for jQuery 4 compatibility
web/modules/contrib/features/modules/features_ui/js/features_ui.admin.js
Diff for updating coreversionrequirement
diff --git a/features.info.yml b/features.info.yml
index f2ded86..ddef07f 100644
--- a/features.info.yml
+++ b/features.info.yml
@@ -2,7 +2,7 @@ name: 'Features'
type: module
description: 'Enables administrators to package configuration into modules.'
package: Development
-core_version_requirement: ^9.4 || ^10
+core_version_requirement: ^10 || ^11
dependencies:
- drupal:config
- config_update:config_update
diff --git a/modules/features_ui/features_ui.info.yml b/modules/features_ui/features_ui.info.yml
index c5b9406..95d5872 100644
--- a/modules/features_ui/features_ui.info.yml
+++ b/modules/features_ui/features_ui.info.yml
@@ -2,7 +2,7 @@ name: Features UI
type: module
description: 'Provides the user interface for Features.'
package: Development
-core_version_requirement: ^9.4 || ^10
+core_version_requirement: ^10 || ^11
configure: features.assignment
dependencies:
- features:features
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | features-3447460.patch | 2.12 KB | rajan kumar@2026 |
Issue fork features-3447460
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:
Comments
Comment #2
rajan kumar@2026 commentedHii @mark_fullmer
I have created patch for "Drupal 11 compatibility for Features module" . Thanks
Comment #3
cosmicdreams commentedCame across this patch because I wanted to work features into a demo. I can't even get the demo going because I can't get features included via composer.
We need this in.
Comment #4
cosmicdreams commentedComment #5
cosmicdreams commentedI think this patch needs more testing. I did the following:
Comment #8
hswong3i commentedApply this MR for D11 now with:
Comment #9
hswong3i commentedMerge with https://www.drupal.org/node/3229045
Comment #10
bradallenfisher commentedvery excited for this!
Comment #11
mark_fullmerThe latest two commits address compatibility with PHPUnit 10 and PHP 8.2:
PHPUnit tests are green for both Drupal 10 and Drupal 11. This is ready for a narrowly-scoped release, 8.x-3.16, which would include only this change and https://git.drupalcode.org/project/features/-/commit/d8bb8c1baa795b93b27... compared to 8.x-3.15.
Comment #12
mark_fullmerCan the maintainers provide a timeline for when this compatibility will be provided in a new release? Thanks for all the work you do!
Comment #13
timb commentedlooking forward to D11 release.
Comment #14
trackleft2Can we at least have a dev release with this change? Thanks for all the work you do!
Comment #15
clayfreemanSending to Needs work on a small nit.
Comment #16
trackleft2That nitpick should be resolved in #3441878: Use dependency injection instead \Drupal calls.
Comment #18
dave reidComment #19
quicksketchThank you so much @davereid! I tested this merge request against an active project and it worked great. In my testing, I was upgrading from Drupal 10.4.1 to 11.1.5.
I tested by the following:
Added a custom repository to the root composer.json in the
"repositories"section:Changed my
"require"line for Features to the branch:Then deleted
composer.lockand rancomposer install.As all my other dependencies were already upgraded on Drupal 11-compatible versions, I was then able to install Drupal 11 normally. Note that my site had several Feature modules that needed to be manually changed in their
.info.ymlfiles tocore_version_requirement: '^9.3 || ^10 || ^11'.Drupal 11 installed successfully, using the new Features version.
Once up and running I tested:
.info.ymlfile was correctly changed tocore_version_requirement: '^10 || ^11', including 11 and dropping 9.3.I still see some existing issues that pre-existed like #2912545: Permissions stripped from roles, but dependencies added anyway, but I found no regressions and most importantly, this unblocks our project's upgrade to Drupal 11.
Code changes all look great to me too. This looks ready to go!
Comment #20
podarok+1 RTBC https://www.drupal.org/project/features/issues/3447460#comment-16051589 #19
Let's release major alpha|beta version of the module, please
Comment #21
mark_fullmerAgreed that a release is well justified, though I'll note that it should probably simply reflect a minor version release from 8.x-3.14 to 8.x-3.15 . Per https://www.drupal.org/project/drupal/issues/3357742 , this can be provided via a minor release since it does not drop support for currently supported versions of Drupal core.
Comment #22
daddison commentedHi maintainers, thanks for all you do to make this valuable module available for the community! When can we expect a Drupal 11 release?
Comment #23
murilohp commentedThis is a static patch of the MR to be applied.
Comment #24
brahmjeet789 commentedHI Maintainers, when we can expect Drupal 11 Release?
Comment #25
mark_fullmerReviewing the commentary on the merge request, it appears that the only question holding this up is whether and how this module should leverage the new parameter,
$previous_config_names, available inConfigInstaller::findPreExistingConfiguration, per https://git.drupalcode.org/project/features/-/merge_requests/39#note_494953This new parameter was introduced in Drupal core (11.2.x) as part of #3416522: Add the ability to install multiple modules and only do a single container rebuild to ModuleInstaller . Per that issue summary, the role of this parameter is a way of identifying when a container rebuild can be bypassed during the installation of a new module:
As this relates to the role of the Features module, as a tool for executing configuration imports on behalf of bundled configuration, I don't see this module as having a role in determining whether certain configuration changes can skip the container rebuild. That would be relevant only in the context of a finite, curated set of configuration in, say, a module, where the developer knows that a container rebuild is not necessary.
Furthermore, this has been implemented in Drupal core's business logic as an addition to a conditional that checks for
$active_storage->exists($config_name), so in the context of Features imports, the core code already checks what it needs to check: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...Therefore, I conclude that the Features implementation of should simply pass along the second parameter as is already staged in the merge request,
array $previous_config_names = [].Thus this issue remains, in my opinion, RTBC. A timely merge and release for Drupal 11 compatibility is important to the community!
Comment #26
rahul_ commentedHello Team,
I would need to update my drupal site to D10 to D11, when we will plan this D11 supported version?
Is there any tentative date?
when we can expect Drupal 11 Supported Release?
Comment #27
anicho01 commentedOK, I'm going to triple down on when the expected D11-compatible release will come out --
Comment #28
bkosborneAgreed all around. This looks ready to go.
Comment #30
mark_fullmerThanks, everyone, for the contribution! This is included in the 8.x-3.15 release of Features.
Comment #32
quicksketchThank you so much @mark_fullmer and all contributors to this issue! This has enabled Mukurtu CMS (a Drupal distribution for supporting indigenous culture) to upgrade to Drupal 11!
This is so greatly appreciated. This module is carrying a lot of baggage so I know this wasn't the easiest thing to get completed.