- First commit to issue fork.
- ๐ฌ๐งUnited Kingdom jonnyhocks
I've created a fork and applied the generated patch in #2
- Merge request !3Issue #3296883: Automated Drupal 10 compatibility fixes โ (Merged) created by jonnyhocks
- Status changed to RTBC
over 1 year ago 12:31pm 8 March 2023 - ๐ณ๐ฑNetherlands mike.vindicate
The patch provided by the update bot is enough to make the module compatible with D10.
In my testing, the patch does not allow for me to upgrade from Drupal 9.5.9 to Drupal 10.0.9 with Views Contextual Range Filter (1.0.0) installed. Here are the steps I just tried on a local environment running PHP 8.1:
1. Create a fresh Drupal 9.5.9 project:
composer create-project drupal/recommended-project:9.5.9
2. Requiredrupal/contextual_range_filter
3. Requirecweagans/composer-patches
and enable patching.
4. Apply the patch.
5. Follow instructions to upgrade to Drupal 10 with Composer.If I remove
drupal/contextual_range_filter
from composer.json and then re-runcomposer update -W
, Drupal 10 installs successfully.composer.json
{ "name": "drupal/recommended-project", "description": "Project template for Drupal 9 projects with a relocated document root", "type": "project", "license": "GPL-2.0-or-later", "homepage": "https://www.drupal.org/project/drupal", "support": { "docs": "https://www.drupal.org/docs/user_guide/en/index.html", "chat": "https://www.drupal.org/node/314178" }, "repositories": [ { "type": "composer", "url": "https://packages.drupal.org/8" } ], "require": { "composer/installers": "^1.9", "cweagans/composer-patches": "~1.0", "drupal/contextual_range_filter": "^1.0", "drupal/core-composer-scaffold": "^10", "drupal/core-project-message": "^10", "drupal/core-recommended": "^10" }, "conflict": { "drupal/drupal": "*" }, "minimum-stability": "stable", "prefer-stable": true, "config": { "allow-plugins": { "composer/installers": true, "drupal/core-composer-scaffold": true, "drupal/core-project-message": true, "dealerdirect/phpcodesniffer-composer-installer": true }, "sort-packages": true }, "extra": { "enable-patching": true, "drupal-scaffold": { "locations": { "web-root": "web/" } }, "installer-paths": { "web/core": [ "type:drupal-core" ], "web/libraries/{$name}": [ "type:drupal-library" ], "web/modules/contrib/{$name}": [ "type:drupal-module" ], "web/profiles/contrib/{$name}": [ "type:drupal-profile" ], "web/themes/contrib/{$name}": [ "type:drupal-theme" ], "drush/Commands/contrib/{$name}": [ "type:drupal-drush" ], "web/modules/custom/{$name}": [ "type:drupal-custom-module" ], "web/profiles/custom/{$name}": [ "type:drupal-custom-profile" ], "web/themes/custom/{$name}": [ "type:drupal-custom-theme" ] }, "drupal-core-project-message": { "include-keys": [ "homepage", "support" ], "post-create-project-cmd-message": [ "<bg=blue;fg=white> </>", "<bg=blue;fg=white> Congratulations, youโve installed the Drupal codebase </>", "<bg=blue;fg=white> from the drupal/recommended-project template! </>", "<bg=blue;fg=white> </>", "", "<bg=yellow;fg=black>Next steps</>:", " * Install the site: https://www.drupal.org/docs/installing-drupal", " * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html", " * Get support: https://www.drupal.org/support", " * Get involved with the Drupal community:", " https://www.drupal.org/getting-involved", " * Remove the plugin that prints this message:", " composer remove drupal/core-project-message" ] }, "patches": { "drupal/contextual_range_filter": { "Rectorizes Drupal 10 compatibility": "https://www.drupal.org/files/issues/2022-07-18/contextual_range_filter.1.x-dev.rector.patch" } } } }
Output from failed update
โฏ composer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' --update-with-dependencies --no-update Info from https://repo.packagist.org: #StandWithUkraine ./composer.json has been updated Desktop/test/drupal9 via ๐ v8.1.19 โฏ composer update -W Gathering patches for root package. Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - zendframework/zend-feed 2.12.0 requires php ^5.6 || ^7.0 -> your php version (8.1.19) does not satisfy that requirement. - laminas/laminas-feed[2.12.0, ..., 2.12.3] require php ^5.6 || ^7.0 -> your php version (8.1.19) does not satisfy that requirement. - symfony-cmf/routing[1.4.0, ..., 1.4.1] require php ^5.3.9|^7.0 -> your php version (8.1.19) does not satisfy that requirement. - laminas/laminas-feed[2.13.0, ..., 2.14.1] require php ^7.3 || ~8.0.0 -> your php version (8.1.19) does not satisfy that requirement. - drupal/core[8.9.11, ..., 8.9.20] require php ^7.0.8 -> your php version (8.1.19) does not satisfy that requirement. - drupal/core[9.0.10, ..., 9.0.14] require php ^7.3 -> your php version (8.1.19) does not satisfy that requirement. - Root composer.json requires drupal/contextual_range_filter ^1.0 -> satisfiable by drupal/contextual_range_filter[1.0.0]. - Conclusion: don't install drupal/core 9.5.2 (conflict analysis result) - drupal/core-recommended 10.0.2 requires drupal/core 10.0.2 -> satisfiable by drupal/core[10.0.2]. - Conclusion: don't install drupal/core 10.0.2 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.3 (conflict analysis result) - drupal/core-recommended 10.0.3 requires drupal/core 10.0.3 -> satisfiable by drupal/core[10.0.3]. - Conclusion: don't install drupal/core 10.0.3 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.4 (conflict analysis result) - drupal/core-recommended 10.0.4 requires drupal/core 10.0.4 -> satisfiable by drupal/core[10.0.4]. - Conclusion: don't install drupal/core 10.0.4 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.5 (conflict analysis result) - drupal/core-recommended 10.0.5 requires drupal/core 10.0.5 -> satisfiable by drupal/core[10.0.5]. - Conclusion: don't install drupal/core 10.0.5 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.6 (conflict analysis result) - drupal/core-recommended 10.0.6 requires drupal/core 10.0.6 -> satisfiable by drupal/core[10.0.6]. - Conclusion: don't install drupal/core 10.0.6 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.7 (conflict analysis result) - drupal/core-recommended 10.0.7 requires drupal/core 10.0.7 -> satisfiable by drupal/core[10.0.7]. - Conclusion: don't install drupal/core 10.0.7 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.8 (conflict analysis result) - drupal/core-recommended 10.0.8 requires drupal/core 10.0.8 -> satisfiable by drupal/core[10.0.8]. - Conclusion: don't install drupal/core 10.0.8 (conflict analysis result) - Conclusion: don't install drupal/core 9.5.9 (conflict analysis result) - drupal/core-recommended 10.0.9 requires drupal/core 10.0.9 -> satisfiable by drupal/core[10.0.9]. - Conclusion: don't install drupal/core 10.0.9 (conflict analysis result) - drupal/core[8.4.0, ..., 8.9.10] require symfony-cmf/routing ^1.4 -> satisfiable by symfony-cmf/routing[1.4.0, 1.4.1]. - drupal/core[8.2.0, ..., 8.3.9] require symfony-cmf/routing ~1.4 -> satisfiable by symfony-cmf/routing[1.4.0, 1.4.1]. - drupal/core[8.8.0, ..., 8.8.12] require zendframework/zend-feed ^2.12 -> satisfiable by laminas/laminas-feed[2.12.0, ..., 2.14.1], zendframework/zend-feed[2.12.0]. - drupal/core-recommended 10.0.1 requires drupal/core 10.0.1 -> satisfiable by drupal/core[10.0.1]. - Conclusion: don't install drupal/core 10.0.1 (conflict analysis result) - drupal/contextual_range_filter 1.0.0 requires drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.9]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.1.2, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.1.8, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.7.0, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9]. - drupal/core-recommended 10.0.0 requires drupal/core 10.0.0 -> satisfiable by drupal/core[10.0.0]. - Root composer.json requires drupal/core-recommended ^10 -> satisfiable by drupal/core-recommended[10.0.0, ..., 10.0.9]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
- ๐ท๐ดRomania abautu
The reason why the module doesn't install even when you apply the patch is that the patch is applied to the module code only if instalation is succesfull (so that Drupal 10 can install the module). However, before instalation, composer checks the module metadata (from https://packages.drupal.org/files/packages/8/p2/drupal/contextual_range_... and finds out the module requires drupal/core:^8 || ^9) and refuses the instalation.
Therefore, you need the patch for Drupal, but you also need this for composer: define a package repository in your composer.json and tell composer this package works with drupal/core:^10. Add this lines inside
repositories
, above your the https://packages.drupal.org/8 repository.{ "type": "package", "package": { "version": "1.0.0", "dist": { "type": "zip", "url": "https:\/\/ftp.drupal.org\/files\/projects\/contextual_range_filter-8.x-1.0.zip", "reference": "8.x-1.0", "shasum": "0e7d74a9b6762b2aec881ae0580433884661972f" }, "type": "drupal-module", "name": "drupal\/contextual_range_filter", "require": { "drupal\/core": "^8 || ^9 || ^10" } } },
- ๐ฉ๐ชGermany vistree
Can we have a D10 compatible release in the meanwhile?
- ๐จ๐ฆCanada chrisck Vancouver, BC ๐จ๐ฆ
+1 to new D10 release please
- ๐บ๐ธUnited States seth.e.shaw
+1 to a new D10 release. D9's EOL is quickly approaching.
- ๐จ๐ฆCanada Shane Birley
+1 Drupal 10 upgrades are starting in my world.
- ๐ฎ๐ณIndia JayVisaria
Could you please release a D10-compatible version?
-
JayVisaria โ
committed 10d1afb8 on 8.x-2.x authored by
jonnyhocks โ
Issue #3296883: Automated Drupal 10 compatibility fixes
-
JayVisaria โ
committed 10d1afb8 on 8.x-2.x authored by
jonnyhocks โ