I'm trying to upgrade my projects (I have 4 in total), from Drupal core 9.5.10 to 10.
It's failing with the traditional "Your requirements could not be resolved to an installable set of packages." (full message below).
I have a couple of modules installed that have versions incompatible with Drupal 10. But the next version is only compatible with Drupal 10 itself. In other words, these modules do not have a version that is compatible with both 9.5.10 and 10. These are:
- drupal/captcha: (v 2.0)
- drupal/dynamic_entity_reference: (v 3.1)
I wonder what is the proper way of dealing with these modules during upgrade.
The full message from the upgrade is as follows:
Command:
composer require drupal/core-recommended:^10.0 drupal/core-composer-scaffold:^10.0 drupal/core-project-message:^10.0 --update-with-all-dependenciesResponse:
./composer.json has been updated
Running composer update drupal/core-recommended drupal/core-composer-scaffold drupal/core-project-message --with-all-dependencies
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/core-recommended 10.0.x-dev requires drupal/core 10.0.x-dev -> found drupal/core[10.0.x-dev] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.1.x-dev requires drupal/core 10.1.x-dev -> found drupal/core[10.1.x-dev] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha1 requires drupal/core 10.0.0-alpha1 -> found drupal/core[10.0.0-alpha1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha2 requires drupal/core 10.0.0-alpha2 -> found drupal/core[10.0.0-alpha2] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha3 requires drupal/core 10.0.0-alpha3 -> found drupal/core[10.0.0-alpha3] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha4 requires drupal/core 10.0.0-alpha4 -> found drupal/core[10.0.0-alpha4] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha5 requires drupal/core 10.0.0-alpha5 -> found drupal/core[10.0.0-alpha5] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha6 requires drupal/core 10.0.0-alpha6 -> found drupal/core[10.0.0-alpha6] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-alpha7 requires drupal/core 10.0.0-alpha7 -> found drupal/core[10.0.0-alpha7] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-beta1 requires drupal/core 10.0.0-beta1 -> found drupal/core[10.0.0-beta1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-beta2 requires drupal/core 10.0.0-beta2 -> found drupal/core[10.0.0-beta2] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-rc1 requires drupal/core 10.0.0-rc1 -> found drupal/core[10.0.0-rc1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-rc2 requires drupal/core 10.0.0-rc2 -> found drupal/core[10.0.0-rc2] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0-rc3 requires drupal/core 10.0.0-rc3 -> found drupal/core[10.0.0-rc3] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.0 requires drupal/core 10.0.0 -> found drupal/core[10.0.0] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.1 requires drupal/core 10.0.1 -> found drupal/core[10.0.1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.2 requires drupal/core 10.0.2 -> found drupal/core[10.0.2] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.3 requires drupal/core 10.0.3 -> found drupal/core[10.0.3] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.4 requires drupal/core 10.0.4 -> found drupal/core[10.0.4] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.5 requires drupal/core 10.0.5 -> found drupal/core[10.0.5] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.6 requires drupal/core 10.0.6 -> found drupal/core[10.0.6] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.7 requires drupal/core 10.0.7 -> found drupal/core[10.0.7] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.8 requires drupal/core 10.0.8 -> found drupal/core[10.0.8] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.9 requires drupal/core 10.0.9 -> found drupal/core[10.0.9] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.0.10 requires drupal/core 10.0.10 -> found drupal/core[10.0.10] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.1.0-alpha1 requires drupal/core 10.1.0-alpha1 -> found drupal/core[10.1.0-alpha1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.1.0-beta1 requires drupal/core 10.1.0-beta1 -> found drupal/core[10.1.0-beta1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.1.0-rc1 requires drupal/core 10.1.0-rc1 -> found drupal/core[10.1.0-rc1] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.1.0 requires drupal/core 10.1.0 -> found drupal/core[10.1.0] but these were not loaded, likely because it conflicts with another require.
- drupal/core-recommended 10.1.1 requires drupal/core 10.1.1 -> found drupal/core[10.1.1] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires drupal/core-recommended ^10.0 -> satisfiable by drupal/core-recommended[10.0.0-alpha1, ..., 10.1.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.Not sure if relevant, but here are the responses to composer prohibits and composer outdated, as well as composer.json:
Command:
composer prohibits drupal/core 10(same as "composer why-not drupal/core 10")
Response:
drupal/captcha 1.10.0 requires drupal/core (^8.9 || ^9)
drupal/core-recommended 9.5.10 requires drupal/core (9.5.10)
drupal/drupal-driver v2.1.1 requires drupal/core-utility (^8.4 || ^9)
drupal/dynamic_entity_reference 1.16.0 requires drupal/core (^9.3)
drupal/node_title_help_text 1.2.0 requires drupal/core (^8 || ^9)
drupal/onpoint_search 1.2.5 requires drupal/core (^8 || ^9)
drupal/core 10.0.0 requires symfony/console (^6.2)
rru/drupal dev-master does not require symfony/console (but v4.4.49 is installed)
drupal/core 10.0.0 requires symfony/dependency-injection (^6.2)
rru/drupal dev-master does not require symfony/dependency-injection (but v4.4.49 is installed)
drupal/core 10.0.0 requires symfony/event-dispatcher (^6.2)
rru/drupal dev-master does not require symfony/event-dispatcher (but v4.4.44 is installed)
drupal/core 10.0.0 requires symfony/http-foundation (^6.2)
rru/drupal dev-master does not require symfony/http-foundation (but v4.4.49 is installed)
drupal/core 10.0.0 requires symfony/http-kernel (^6.2)
rru/drupal dev-master does not require symfony/http-kernel (but v4.4.50 is installed)
drupal/core 10.0.0 requires symfony/mime (^6.2)
rru/drupal dev-master does not require symfony/mime (but v5.4.13 is installed)
drupal/core 10.0.0 requires symfony/routing (^6.2)
rru/drupal dev-master does not require symfony/routing (but v4.4.44 is installed)
drupal/core 10.0.0 requires symfony/serializer (^6.2)
rru/drupal dev-master does not require symfony/serializer (but v4.4.47 is installed)
drupal/core 10.0.0 requires symfony/validator (^6.2)
rru/drupal dev-master does not require symfony/validator (but v4.4.48 is installed)
drupal/core 10.0.0 requires symfony/process (^6.2)
rru/drupal dev-master does not require symfony/process (but v4.4.44 is installed)
drupal/core 10.0.0 requires symfony/yaml (^6.2)
rru/drupal dev-master does not require symfony/yaml (but v4.4.45 is installed)
drupal/core 10.0.0 requires twig/twig (^3.4.3)
rru/drupal dev-master does not require twig/twig (but v2.15.5 is installed)
drupal/core 10.0.0 requires guzzlehttp/guzzle (^7.5)
rru/drupal dev-master does not require guzzlehttp/guzzle (but 6.5.8 is installed)
drupal/core 10.0.0 requires guzzlehttp/psr7 (^2.4)
rru/drupal dev-master does not require guzzlehttp/psr7 (but 1.9.1 is installed)
drupal/core 10.0.0 requires asm89/stack-cors (^2.1)
rru/drupal dev-master does not require asm89/stack-cors (but 1.3.0 is installed)
drupal/core 10.0.0 requires psr/log (^3.0)
rru/drupal dev-master does not require psr/log (but 1.1.4 is installed) Command:
composer outdated "drupal/*"Response:
drupal/captcha 1.10.0 2.0.0 The CAPTCHA module provides this feature to virtually any user facing web form on a Drupal site.
drupal/core 9.5.10 10.1.1 Drupal is an open source content management platform powering millions of websites and applications.
drupal/core-composer-scaffold 9.5.10 10.1.1 A flexible Composer project scaffold builder.
drupal/core-project-message 9.5.10 10.1.1 Adds a message after Composer installation.
drupal/core-recommended 9.5.10 10.1.1 Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.
drupal/drupal-driver v2.1.1 v2.2.2 A collection of reusable Drupal drivers
drupal/drupal-extension v4.1.0 v4.2.1 Drupal extension for Behat
drupal/dynamic_entity_reference 1.16.0 3.1.0 Provides a field that allows an entity-reference field to reference more than one entity type.
drupal/linkit 6.0.0 6.1.0 Linkit - Enriched linking experiencecomposer.json:
{
"name": "rru/drupal",
"description": "Project template for Drupal at Royal roads.",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.royalroads.ca",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"ew-packagist": {
"type": "composer",
"url": "https://packagist.ewdev.ca",
"canonical": true
},
"dropzone-js": {
"type": "package",
"package": {
"name": "dropzone/dropzone",
"version": "5.7.2",
"type": "drupal-library",
"dist": {
"type": "zip",
"url": "https://github.com/dropzone/dropzone/archive/v5.7.2.zip"
}
}
},
"jquery-ui-touch-punch": {
"type": "package",
"package": {
"name": "furf/jquery-ui-touch-punch",
"version": "1.0",
"type": "drupal-library",
"source": {
"url": "https://github.com/furf/jquery-ui-touch-punch.git",
"type": "git",
"reference": "master"
}
}
},
"ckeditor-fakeobjects": {
"type": "package",
"package": {
"name": "ckeditor/fakeobjects",
"version": "4.16",
"type": "drupal-library",
"dist": {
"type": "zip",
"url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.16.0.zip"
}
}
},
"ckeditor-indent-block": {
"type": "package",
"package": {
"name": "ckeditor/indentblock",
"version": "4.15",
"type": "drupal-library",
"dist": {
"type": "zip",
"url": "https://download.ckeditor.com/indentblock/releases/indentblock_4.15.0.zip"
}
}
},
"ckeditor-link": {
"type": "package",
"package": {
"name": "ckeditor/link",
"version": "4.16",
"type": "drupal-library",
"dist": {
"type": "zip",
"url": "https://download.ckeditor.com/link/releases/link_4.16.0.zip"
}
}
},
"ckeditor-youtube": {
"type": "package",
"package": {
"name": "ckeditor/youtube",
"version": "2.1.18",
"type": "drupal-library",
"dist": {
"type": "zip",
"url": "https://download.ckeditor.com/youtube/releases/youtube_2.1.18.zip"
}
}
},
"alerts_module_d8": {
"type": "package",
"package": {
"name": "yellowpencil/alerts_module_d8",
"version": "1.0",
"type": "drupal-custom-module",
"source": {
"url": "git@git.yellowpencil.com:yellowpencil/alerts_module_d8.git",
"type": "git",
"reference": "origin/master"
}
}
},
"drupal_admin_guide": {
"type": "package",
"package": {
"name": "yellowpencil/drupal_admin_guide",
"version": "1.0",
"type": "drupal-custom-module",
"source": {
"url": "git@git.yellowpencil.com:yellowpencil/drupal_admin_guide.git",
"type": "git",
"reference": "origin/main"
}
}
},
"drupal_yp_install_profile": {
"type": "package",
"package": {
"name": "yellowpencil/drupal_yp_install_profile",
"version": "1.0",
"type": "drupal-custom-profile",
"source": {
"url": "git@git.yellowpencil.com:yellowpencil/drupal_yp_install_profile.git",
"type": "git",
"reference": "origin/main"
}
}
}
},
"replace": {
"drupal/ckeditor": "*"
},
"require": {
"acquia/blt": "^13.0",
"acquia/memcache-settings": "^1.1",
"behat/behat": "^3.8",
"behat/mink": "^1.8",
"behat/mink-extension": "^2.3",
"ckeditor/fakeobjects": "^4.16",
"ckeditor/indentblock": "^4.15",
"ckeditor/link": "^4.16",
"ckeditor/youtube": "^2.1",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.7",
"dropzone/dropzone": "^5.7.2",
"drupal/acquia_purge": "^1.2",
"drupal/admin_toolbar": "^3.0",
"drupal/admin_toolbar_tools": "^3.0",
"drupal/administerusersbyrole": "^3.0",
"drupal/animated_gif": "^2.0.0",
"drupal/better_exposed_filters": "^6.0",
"drupal/chosen": "^4.0",
"drupal/clientside_validation": "^4.0",
"drupal/colorbox": "^2.0",
"drupal/conditional_fields": "^4.0@alpha",
"drupal/config_filter": "^2.2.0",
"drupal/config_ignore": "^3.0@beta",
"drupal/config_split": "^2.0@beta",
"drupal/contact_emails": "^1.20",
"drupal/contact_storage": "^1.1",
"drupal/context": "^5.0@RC",
"drupal/core-composer-scaffold": "^9.5.10",
"drupal/core-project-message": "^9.5.10",
"drupal/core-recommended": "^9.5.10",
"drupal/ctools": "^4.0",
"drupal/devel": "^5.1",
"drupal/diff": "^1.0",
"drupal/draggableviews": "^2.0",
"drupal/dropzonejs": "^2.5",
"drupal/drupal-extension": "^4.1",
"drupal/dynamic_entity_reference": "^1.16.0",
"drupal/easy_email": "^2.1@beta",
"drupal/editor_advanced_link": "^2.2",
"drupal/entity_browser": "^2.5",
"drupal/entity_usage": "^2.0@beta",
"drupal/field_group": "^3.1",
"drupal/file_delete": "^2.0",
"drupal/filter_perms": "^1.0@alpha",
"drupal/google_tag": "^2.0",
"drupal/honeypot": "^2.0",
"drupal/link_attributes": "^2.0",
"drupal/linkit": "^6.0@beta",
"drupal/linkit_media_library": "^1.0",
"drupal/mail_safety": "^2.0",
"drupal/mailsystem": "^4.3",
"drupal/maxlength": "^2.0.0-rc1",
"drupal/media_bulk_upload": "^3.0",
"drupal/media_bulk_upload_dropzonejs": "^3.0",
"drupal/media_entity_file_replace": "^1.0",
"drupal/memcache": "^2.3",
"drupal/menu_block": "^1.6",
"drupal/menu_breadcrumb": "^2.0@alpha",
"drupal/metatag": "^2.0",
"drupal/mimemail": "^1.0@alpha",
"drupal/node_edit_protection": "^1.0",
"drupal/node_title_help_text": "^1.2",
"drupal/onpoint_search": "^1.2",
"drupal/paragraphs": "^1.12",
"drupal/pathauto": "^1.8",
"drupal/rabbit_hole": "^1.0@beta",
"drupal/recaptcha": "^3.0",
"drupal/redirect": "^1.7",
"drupal/scheduled_transitions": "^2.0",
"drupal/seckit": "^2.0",
"drupal/sendgrid_integration": "^2.1",
"drupal/shield": "^1.6",
"drupal/simple_sitemap": "^4.1.1",
"drupal/slick": "^2.4",
"drupal/slick_views": "^2.6",
"drupal/stage_file_proxy": "^2.0",
"drupal/svg_image": "^3.0",
"drupal/swiftmailer": "^2.2",
"drupal/tablefield": "^2.2",
"drupal/token": "^1.9",
"drupal/twig_field_value": "^2.0",
"drupal/twig_tweak": "^3.0",
"drupal/ultimate_cron": "^2.0@alpha",
"drupal/upgrade_status": "^4.0",
"drupal/username_enumeration_prevention": "^1.2",
"drupal/views_bulk_operations": "^4.1",
"drupal/views_infinite_scroll": "^2.0.0",
"drupal/viewsreference": "^2.0@beta",
"drupal/webform": "^6.2@beta",
"drupal/weight": "^3.3",
"drupal/workbench": "^1.3",
"drupal/workbench_access": "^2.0",
"drush/drush": "~11.0",
"evolvingweb/drupal-ci": "^1",
"furf/jquery-ui-touch-punch": "*"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"acquia/blt": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-project-message": true
}
},
"extra": {
"enable-patching": true,
"patches": {
"drupal/core": {
"CKEditor5 indent.IndentBlock plugin": "patches/core/core_ckeditor5_indent_block.patch"
},
"drupal/tablefield": {
"enable rich text editor for table cell : https://www.drupal.org/project/tablefield/issues/3076448": "https://www.drupal.org/files/issues/2023-01-27/reroll_wysiwyg_support_3076448_30.patch",
"Fix for import csv": "./patches/tablefield/fix-csv-import-issue.patch"
},
"drupal/contact_storage": {
"get all options -including dynamic callback- instead of just static allowed_values": "./patches/contact_storage/options_allowed_values_function.patch",
"Undefined index notice": "https://www.drupal.org/files/issues/2021-01-12/3191567-9.patch"
},
"drupal/paragraphs": {
"https://www.drupal.org/project/paragraphs/issues/2973358#comment-13756793 ": "https://www.drupal.org/files/issues/2020-07-21/paragraphs-widget-ellipsis-title-2973358-4_1.patch"
},
"drupal/file_delete": {
"#3115158 Add functionality to immediately delete files and override usage check": "https://www.drupal.org/files/issues/2022-10-10/3115158-instant-delete-25.patch"
},
"drupal/onpoint_search": {
"#3297757 Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2022-07-18/onpoint_search.1.2.5.rector.patch",
"Drupal 10 Info File fix": "./patches/onpoint_search/fix-d10-info-file.patch"
},
"drupal/node_title_help_text": {
"#3288788 Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-04-24/node_title_help_text-drupal10-update-3288788-8.patch"
}
},
"drupal-scaffold": {
"locations": {
"web-root": "docroot/"
},
"file-mapping": {
"[web-root]/sites/development.services.yml": false,
"[web-root]/sites/default/default.services.yml": false
}
},
"installer-paths": {
"docroot/core": [
"type:drupal-core"
],
"docroot/libraries/{$name}": [
"type:drupal-library"
],
"docroot/libraries/ckeditor/plugins/{$name}": [
"type:drupal-ckeditor-plugin"
],
"docroot/modules/contrib/{$name}": [
"type:drupal-module"
],
"docroot/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"docroot/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"docroot/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"docroot/profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"docroot/themes/custom/{$name}": [
"type:drupal-custom-theme"
]
}
}
"require-dev": {
"kint-php/kint": "^5.0",
"kint-php/kint-twig": "^5.0",
"palantirnet/drupal-rector": "^0.15.1",
"rector/rector": "~0.15.2"
}
}
Thanks,
Alex
Comments
In the case of captcha, it
In the case of captcha, it probably doesn't save much data. I'm guessing you could completely uninstall it, upgrade, and install it again and wouldn't have to change too many settings (obviously, verify that before doing it).
DER is more complicated. Do you have little data in those fields or could you export that data to something, disable the module, and reimport the data?
There are probably cleaner ways to solve the problem, the above is quick and dirty.
Available for paid support, module development, migrations, consulting...
Thank you @TolstoyDotCom,
Thank you @TolstoyDotCom,
Unfortunately DER is quite extensively used on all sites. Each site has at least 10 different content types (one of them has close to 40) and in each one of those, DER has been used multiple times.
I'm fairly new to Drupal (I inherited these sites about a year ago, so I don't have as much experience), but doesn't Drupal have a "best practices" for situations like this?
Moreover, the truth is that I don't even know if this is the reason why the upgrade itself is failing as the messages actually only talk about drupal core itself.
The response to the composer prohibits command is flawed, as I installed patches for node_title_help_text and onpoint_search module and they both show as compliant with Drupal 10 when I run the "upgrade status" module.
Thanks again,
Alex
I'm sure there's a cleaner
I'm sure there's a cleaner way, but you could edit dynamic_entity_reference.info.yml to make it look like it works with D9 and see if that works. Or, do a full backup (don't skip that) and then delete the vendor dir before running the command.
Available for paid support, module development, migrations, consulting...
Alex
https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-...