2

I'm stuck on my efforts to upgrade my sites (I have 5 in total that I manage) from Drupal 9.5.10 to 10.1.1. I'm using PHP 8.1.8.

I'm following the instruction from https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-a-composer-based-site.

Upgrade Status gives me two problems:

  • Dynamic Entity Reference: there is no version compatible with both 9.5.10 and 10 so I've followed the instructions in the same document mentioned above and edited my composer.json to have this line under "require" (originally it made reference only to "2.0@alpha"):

    "drupal/dynamic_entity_reference": "^2.0@alpha || ^4.0@alpha",

  • CKEditor 5 Anchor: this is a custom module and the messages from upgrade status are shown below. Yet, from reading other articles, I'm disregarding them. Should I do something? This is the error:

    PHPStan command failed: /usr/local/bin/php /var/www/vendor/bin/phpstan analyse --memory-limit=1500M --error-format=json --configuration=/tmp/upgrade_status/deprecation_testing.neon /var/www/docroot/modules/custom/ckeditor5_anchor

    Command output: Empty.

    Command error: ! [NOTE] No files found to analyse. [WARNING] This will cause a non-zero exit code in PHPStan 2.0.

This is my composer.json, after running the instructions in the documentation mentioned above, which updates the entries for drupal/core-xxx and drupal/recommended-project, as well as the change mentioned above for the Dynamic Entity Reference module:

{
    "name": "rru/drupal",
    "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": {
        "drupal": {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        "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"
                }
            }
        },
        "ew-packagist": {
            "type": "composer",
            "url": "https://packagist.ewdev.ca",
            "canonical": true
        },
        "asset-packagist": {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    },
    "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": "^2.2",
        "cweagans/composer-patches": "^1.7",
        "dropzone/dropzone": "^5.7.2",
        "drupal/acquia_purge": "^1.2",
        "drupal/admin_toolbar": "^3.2",
        "drupal/admin_toolbar_tools": "^3.0",
        "drupal/administerusersbyrole": "^3.0",
        "drupal/animated_gif": "^2.0",
        "drupal/better_exposed_filters": "^6.0",
        "drupal/chosen": "^4.0",
        "drupal/clientside_validation": "^4.0",
        "drupal/conditional_fields": "^4",
        "drupal/config_filter": "^2.4",
        "drupal/config_ignore": "^3.0@beta",
        "drupal/config_split": "^2.0@RC",
        "drupal/contact_emails": "^1.20",
        "drupal/contact_storage": "^1.1",
        "drupal/core-composer-scaffold": "^10",
        "drupal/core-project-message": "^10",
        "drupal/core-recommended": "^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": "^2.0@alpha || ^4.0@alpha",
        "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/mail_safety": "^2.0",
        "drupal/mailsystem": "^4.3",
        "drupal/maxlength": "^2.1",
        "drupal/media_bulk_upload": "^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": "^2.0@alpha",
        "drupal/recaptcha": "^3.0",
        "drupal/recommended-project": "^10",
        "drupal/redirect": "^1.6",
        "drupal/scheduled_transitions": "^2.4@beta",
        "drupal/seckit": "^2.0",
        "drupal/sendgrid_integration": "^2.1",
        "drupal/shield": "^1.6",
        "drupal/simple_sitemap": "^4.1",
        "drupal/stage_file_proxy": "^2.1",
        "drupal/svg_image": "^3.0",
        "drupal/swiftmailer": "^2.0",
        "drupal/symfony_mailer": "^1.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",
        "drupal/views_infinite_scroll": "^2.0",
        "drupal/viewsreference": "^2.0@beta",
        "drupal/webform": "^6.2@beta",
        "drush/drush": "~11.0",
        "evolvingweb/drupal-ci": "^1",
        "furf/jquery-ui-touch-punch": "^1.0"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "acquia/blt": true,
            "composer/installers": true,
            "cweagans/composer-patches": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "oomphinc/composer-installers-extender": true,
            "phpstan/extension-installer": true
        }
    },
    "extra": {
        "enable-patching": true,
        "patches": {
            "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/honeypot": {
                "getProtectedForms returns null": "patches/fix-null-protected-forms.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/core": {
                "CKEditor5 indent.IndentBlock plugin": "patches/core/core_ckeditor5_indent_block.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-scaffold": {
            "locations": {
                "web-root": "docroot/"
            },
            "file-mapping": {
                "[web-root]/sites/development.services.yml": false,
                "[web-root]/sites/default/default.services.yml": false,
                "[web-root]/.htaccess": 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"
    }
}

After following the instructions from the document I cited above, this is what I get when running composer update:

        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 8.0.0-beta6 requires doctrine/common dev-master#a45d110f71c323e29f41eb0696fa230e3fa1b1b5 -> found doctrine/common[dev-remove-int-cast, dev-deprec-proxy, 2.1.3, ..., 2.13.x-dev, 3.0.0, ..., 3.5.x-dev] but it does not match the constraint.
            - drupal/core[8.0.0-beta13, ..., 8.0.0-beta15] require guzzlehttp/guzzle dev-master#1879fbe853b0c64d109e369c7aeff09849e62d1e -> found guzzlehttp/guzzle[v1.0.3, v1.0.4, v2.0.0, ..., v2.8.8, v3.0.0, ..., v3.8.1, 4.0.0-rc.1, ..., 4.x-dev, 5.0.0, ..., 5.3.x-dev, 6.0.0, ..., 6.5.x-dev, 7.0.0-beta.1, ..., 7.7.x-dev] but it does not match the constraint.
            - drupal/core[8.9.11, ..., 8.9.x-dev] require php ^7.0.8 -> your php version (8.1.8) does not satisfy that requirement.
            - drupal/core[9.0.10, ..., 9.0.x-dev] require php ^7.3 -> your php version (8.1.8) does not satisfy that requirement.
            - rru/drupal is present at version dev-master and cannot be modified by Composer
            - drupal/core-recommended 10.0.0-alpha7 requires drupal/core 10.0.0-alpha7 -> satisfiable by drupal/core[10.0.0-alpha7].
            - Conclusion: don't install drupal/core 10.0.0-alpha7 (conflict analysis result)
            - drupal/core-recommended 10.1.0-alpha1 requires drupal/core 10.1.0-alpha1 -> satisfiable by drupal/core[10.1.0-alpha1].
            - Conclusion: don't install drupal/core 10.1.0-alpha1 (conflict analysis result)
            - drupal/core-recommended 10.0.0-beta1 requires drupal/core 10.0.0-beta1 -> satisfiable by drupal/core[10.0.0-beta1].
            - Conclusion: don't install drupal/core 10.0.0-beta1 (conflict analysis result)
            - drupal/core-recommended 10.0.0-beta2 requires drupal/core 10.0.0-beta2 -> satisfiable by drupal/core[10.0.0-beta2].
            - Conclusion: don't install drupal/core 10.0.0-beta2 (conflict analysis result)
            - drupal/core-recommended 10.1.0-beta1 requires drupal/core 10.1.0-beta1 -> satisfiable by drupal/core[10.1.0-beta1].
            - Conclusion: don't install drupal/core 10.1.0-beta1 (conflict analysis result)
            - drupal/core-recommended 10.0.0-rc1 requires drupal/core 10.0.0-rc1 -> satisfiable by drupal/core[10.0.0-rc1].
            - Conclusion: don't install drupal/core 10.0.0-rc1 (conflict analysis result)
            - drupal/core-recommended 10.0.0-rc2 requires drupal/core 10.0.0-rc2 -> satisfiable by drupal/core[10.0.0-rc2].
            - Conclusion: don't install drupal/core 10.0.0-rc2 (conflict analysis result)
            - drupal/core-recommended 10.0.0-rc3 requires drupal/core 10.0.0-rc3 -> satisfiable by drupal/core[10.0.0-rc3].
            - Conclusion: don't install drupal/core 10.0.0-rc3 (conflict analysis result)
            - drupal/core-recommended 10.1.0-rc1 requires drupal/core 10.1.0-rc1 -> satisfiable by drupal/core[10.1.0-rc1].
            - Conclusion: don't install drupal/core 10.1.0-rc1 (conflict analysis result)
            - drupal/core-recommended 10.0.0 requires drupal/core 10.0.0 -> satisfiable by drupal/core[10.0.0].
            - Conclusion: don't install drupal/core 10.0.0 (conflict analysis result)
            - 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/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)
            - 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)
            - 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)
            - 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)
            - 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)
            - 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)
            - 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)
            - 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-recommended 10.0.10 requires drupal/core 10.0.10 -> satisfiable by drupal/core[10.0.10].
            - Conclusion: don't install drupal/core 10.0.10 (conflict analysis result)
            - drupal/core-recommended 10.1.0 requires drupal/core 10.1.0 -> satisfiable by drupal/core[10.1.0].
            - Conclusion: don't install drupal/core 10.1.0 (conflict analysis result)
            - drupal/core-recommended 10.1.1 requires drupal/core 10.1.1 -> satisfiable by drupal/core[10.1.1].
            - Conclusion: don't install drupal/core 10.1.1 (conflict analysis result)
            - drupal/core-recommended 10.0.0-alpha6 requires drupal/core 10.0.0-alpha6 -> satisfiable by drupal/core[10.0.0-alpha6].
            - drupal/core-recommended 10.0.0-alpha5 requires drupal/core 10.0.0-alpha5 -> satisfiable by drupal/core[10.0.0-alpha5].
            - drupal/core-recommended 10.0.0-alpha4 requires drupal/core 10.0.0-alpha4 -> satisfiable by drupal/core[10.0.0-alpha4].
            - drupal/core-recommended 10.0.0-alpha3 requires drupal/core 10.0.0-alpha3 -> satisfiable by drupal/core[10.0.0-alpha3].
            - drupal/core-recommended 10.0.0-alpha2 requires drupal/core 10.0.0-alpha2 -> satisfiable by drupal/core[10.0.0-alpha2].
            - drupal/core-recommended 10.0.0-alpha1 requires drupal/core 10.0.0-alpha1 -> satisfiable by drupal/core[10.0.0-alpha1].
            - drupal/core[8.0.0-beta12, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.4.3, 10.0.0-alpha1, ..., 10.0.0-alpha6] cannot be installed as that would require removing rru/drupal[dev-master]. They all replace drupal/ckeditor and thus cannot coexist.
            - Root composer.json requires drupal/onpoint_search ^1.2 -> satisfiable by drupal/onpoint_search[1.2.0, ..., 1.2.5].
            - drupal/core-recommended 10.1.x-dev requires drupal/core 10.1.x-dev -> satisfiable by drupal/core[10.1.x-dev].
            - Conclusion: don't install drupal/core 10.1.x-dev (conflict analysis result)
            - drupal/onpoint_search[1.2.0, ..., 1.2.5] require drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev].
            - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.1.x-dev, 11.x-dev].
            - You can only install one version of a package, so only one of these can be installed: drupal/core[8.7.0-alpha1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.1.x-dev, 11.x-dev].
            - drupal/core-recommended 10.0.x-dev requires drupal/core 10.0.x-dev -> satisfiable by drupal/core[10.0.x-dev].
            - Root composer.json requires drupal/core-recommended ^10 -> satisfiable by drupal/core-recommended[10.0.0-alpha1, ..., 10.1.x-dev].
        
        Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

From all those messages, a lot of lines about "older versions" (Drupal core 8, 9), and "satisfiable", which I'm disregarding. From the ones that are left, these are the ones I don't understand:

- rru/drupal is present at version dev-master and cannot be modified by Composer
- drupal/core[8.0.0-beta12, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.4.3, 10.0.0-alpha1, ..., 10.0.0-alpha6] cannot be installed as that would require removing rru/drupal[dev-master]. They all replace drupal/ckeditor and thus cannot coexist.

Both lines mention "dev-master", which has references only in composer.lock. (I even deleted and recreated it and it's still there.)

Not sure what they mean or how to move forward from here.  Any help is appreciated.

5
  • Thank you for showing composer.json! Thank you for showing command output! So many contributors on this site do not.
    – cilefen
    Jul 25 at 16:38
  • Just to be clear, are you adding the --with-all-dependencies flag as directed in the error output? It is really helpful to show the command you typed in addition to its output.
    – cilefen
    Jul 27 at 18:30
  • FWIW I highly recommend reading the Composer docs getcomposer.org/doc to avoid disappointment and aggravation.
    – cilefen
    Jul 27 at 20:33
  • Yes, all my runs of composer included --with-all-dependencies flag.
    – alex
    Jul 28 at 20:14
  • having issues when upgrading d9.5.11 to d10.1 it's a php-http/guzzle6-adapter guzzle dependency which is 6 and drupal core require guzzlehttp/guzzle ~7.7.0 how i posibly can solve the issue
    – Vitaliy K
    Oct 27 at 10:58

4 Answers 4

2

I was able to upgrade from 9.5.10 to 10.1.1 using a number of the comments and solutions listed here so just wanted to have it in one place, in case someone else hits the wall like I did:

  • First, ensure that your underlying tools are up to date and are compatible with Drupal 10. I'm talking about PHP, Drush, BLT, node, etc (whatever you use)

  • Identified two groups of modules: modules that had versions which were only compatible with either Drupal 9 or Drupal 10 (ex: dynamic entity reference); modules for which there were patches for Drupal 10 but were not "officially" compatible with Drupal 10, i.e., in packagist.org were still shown as being compatible only with Drupal 9.

  • From the groups above, remove all of those for which it made more sense to remove them now and reinstall them later, than to try and upgrade them. For example, a module with simple or no configuration, and no impact on other modules, might be easer to remove and reinstall later. One example for me was OnPointSearch.

  • For the modules that I decided not to remove, I've installed and configured mglaman/composer-drupal-lenient and configured it for all of them. After installing this module, here is an example of a composer command to add a new module to the list of lenient modules:

    composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/dynamic_entity_reference"]'

  • In my case I also had to remove the following modules: behat/behat, behat/mink-extension, and drupal/drupal-extension (I've reinstalled them after upgrade)

  • I have 5 projects and for some of them, after failing repeatedly on the core upgrade itself, I just "gave up" and ran a composer require with the flag "-W" for each contributed module (I'm pretty sure the previous administrator didn't use that flag so a few modules had updates available for their dependencies). Yet, I can't be sure which ones (if any) were holding me back.

  • Nevertheless, at this point I was able to finally upgrade to D10

  • Update all modules you included in your "lenient" list

  • Reinstall and configure all modules you removed

If you are using composer (which I'm assuming you are), don't forget to update the database and export the configuration so you can deploy to production.

One last bit of advise: don't forget to inspect your pages on a browser to be sure that not only your custom code but also contributed modules have moved away from the jQuery "Once" library in favor of the Drupal library of the same name (the JavaScript code has to be updated accordingly.)

Hope it helps for others. Good luck!

0

The reason is in the command output:

drupal/onpoint_search[1.2.0, ..., 1.2.5] require drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev].

drupal/onpoint_search release versions do not support Drupal 10.

4
  • I think there actually is a way to do that with forks, not patches.
    – cilefen
    Jul 26 at 11:32
  • Thank you @cilefen. I actually had noticed that before and added my own patch to composer. You will see in the composer.json file that there's a second patch for that module that I called "Drupal 10 Info File Fix", where I replace the core_version_requirement line to include version 10 (core_version_requirement: ^8 || ^9 || ^10). Did I do it wrong? Should I have done anything else? Thanks again.
    – alex
    Jul 26 at 17:24
  • Yes, you did it wrong. I think you have to use the "lenient" Composer plugin, described a bit in drupal.org/community-initiatives/contribution-events-initiative/…
    – cilefen
    Jul 26 at 17:29
  • @user19512127 I would rather wait the project maintainers make a Drupal 10 release. Since they do not define their module as compatible with Drupal 10, they can make changes that are not compatible with Drupal 10.
    – apaderno
    Jul 27 at 10:53
0

You get that error because the OnPoint Search module requires either Drupal 8 or Drupal 9. That causes the error you are seeing when upgrading to Drupal 10.
In fact, its .info.yml contains the following lines (when I posted this answer).

name: OnPoint Search
type: module
description: Integrates OnPoint Search into your site.
package: Search
core: 8.x
version: 1.0
configure: onpoint_search.settings
core_version_requirement: ^8 || ^9

Telling Composer to apply a patch that changes the required Drupal versions will not work, as Composer first downloads the module checking if one of its releases does not create compatibility issues, and then applies the patches provided in the patch section of the composer.json file. (To apply a patch, Composer needs to first download the file to patch.)

As for what to do next, I would rather wait the project maintainers make a release for Drupal 10.
Since they do not declare their project to be compatible with Drupal 10, they can make changes that are not compatible with Drupal 10; for example, they could use a class, function, method, or service that has been removed in Drupal 10. As long as the module works on Drupal 9, as per the core_version_requirement value, those changes are fine.

6
  • Composer has no knowledge of info.yml files.
    – cilefen
    Jul 27 at 9:41
  • Composer knows what the Packagist servers tell it. The Packagist server that runs on packages.drupal.org (or better, the server that has API parity with packagist.org and runs on packages.drupal.org) exposes the information given in the .info.yml files.
    – apaderno
    Jul 27 at 10:16
  • That is why Drupal modules hosted on drupal.org do not need a composer.json file to expose which Drupal versions they require. (As proof, the repository for that module does not contain a composer.json file, in the master branch nor in the 1.2.5 tag.)
    – apaderno
    Jul 27 at 10:17
  • It does not work for installation profiles, though. See Drupal Composer packaging ignores core version constraints for profiles.
    – apaderno
    Jul 27 at 10:36
  • You can use github.com/mglaman/composer-drupal-lenient to let composer install a module without a compatible version with D10 and then the relative patch to make the module compatible.
    – Giuseppe
    Jul 27 at 10:42
-4

In order to update to Drupal 10 with modules that still are not compatible, you can require the drupal core as an older version

drupal/core:10.1.1 as 9.5.10

When your module are upgraded, you then will be able to remove that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.