Can't update to 4.3.8 via Composer

Created on 11 April 2025, about 1 month ago

Trying to update to the latest version with composer require 'drupal/search_api_solr:^4.3' but I'm stuck on 4.3.7. Looks like 4.3.8 may not be in the repository? I have cleared my composer cache and other updates have all worked as expected today.

$ composer show drupal/search_api_solr
name     : drupal/search_api_solr
descrip. : Offers an implementation of the Search API that uses an Apache Solr server for indexing content.
keywords : 
versions : * 4.3.7
type     : drupal-module
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/search_api_solr
source   : [git] https://git.drupalcode.org/project/search_api_solr.git 4.3.7
dist     : [zip] https://ftp.drupal.org/files/projects/search_api_solr-4.3.7.zip 4.3.7
path     : /app/docroot/modules/contrib/search_api_solr
names    : drupal/search_api_solr
πŸ“Œ Task
Status

Active

Version

4.3

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States jmcintyre

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jmcintyre
  • πŸ‡ΊπŸ‡ΈUnited States jmcintyre

    I Just learned the info I included in my original post reflects what's on my machine, not what's in the repo, so ignore that.

    Composer why-not reports this:

    drupal/search_api_solr   4.3.8   requires     solarium/solarium (^6.3.7)
    drupal/recommended-project dev-master does not require solarium/solarium (but 6.3.6 is installed)

    I'm on Drupal 10.4.6, if that's relevant.

  • πŸ‡ΊπŸ‡ΈUnited States jmcintyre
  • πŸ‡ΊπŸ‡ΈUnited States jmcintyre

    Problem solved, though I'm not sure why specifying to update dependencies was necessary. This worked:

    composer require 'drupal/search_api_solr:^4.3' --update-with-all-dependencies

  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ
  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    I am also seeing this ... Search API Solr is stuck at 4.3.7 and won't update to 4.3.8.

    All other modules (Search API, Leaflet, Cache Exclude, etc.) got updated fine, except for Search API Solr. This is from my composer.json:

            "drupal/search_api": "^1.29",
            "drupal/search_api_solr": "^4.2",
    

    Like I wrote, Search API was updated fine with composer update drupal/search_api to version 1.38.0 ...

    Yet, composer update drupal/search_api_solr reports back "Nothing to install, update or remove".

    So there seems to be a problem with Search API Solr. We shouldn't need to give it special treatment with "--update-with-all-dependencies", right? So I'm re-opening this issue.

  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ

    I don't think that this is an issue with search_api_solr, but with your installation. Run
    composer why-not drupal/search_api_solr:4.3.8

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Thanks for the suggestion, I get the same message as @jmcintyre:

    $ composer why-not drupal/search_api_solr 4.3.8
    drupal/search_api_solr     4.3.8    requires         solarium/solarium (^6.3.7)                 
    drupal/recommended-project dev-main does not require solarium/solarium (but 6.3.6 is installed) 
    Not finding what you were looking for? Try calling `composer require "drupal/search_api_solr:4.3.8" --dry-run` to get another view on the problem.
    
    Composer [why-not drupal/search_api_solr 4.3.8] failed, composer command failed: exit status 1. stderr=
    

    Here's the result of the suggested --dry-run:

    $ composer require "drupal/search_api_solr:4.3.8" --dry-run
    ./composer.json has been updated
    Running composer update drupal/search_api_solr
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires drupal/search_api_solr 4.3.8 -> satisfiable by drupal/search_api_solr[4.3.8].
        - drupal/search_api_solr 4.3.8 requires solarium/solarium ^6.3.7 -> found solarium/solarium[6.3.7] but the package is fixed to 6.3.6 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    
    Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
    
    Installation failed, reverting ./composer.json and ./composer.lock to their original content.
    
    Composer [require drupal/search_api_solr:4.3.8 --dry-run] failed, composer command failed: exit status 2. stderr=
    

    From composer.lock:

    [...]
                "require": {
                    "composer-runtime-api": ">=2.0",
                    "composer/semver": "^1.0|^3.0",
                    "consolidation/annotated-command": "^2.12|^4.1",
                    "drupal/core": "^10.2 || ^11.0",
                    "drupal/search_api": "^1.37|1.x-dev",
                    "ext-dom": "*",
                    "ext-json": "*",
                    "ext-simplexml": "*",
                    "laminas/laminas-stdlib": "^3.2",
                    "maennchen/zipstream-php": "^2.2.1|^3.0.2",
                    "solarium/solarium": "^6.3.5"
    

    ... and:

    [...]
            {
                "name": "solarium/solarium",
                "version": "6.3.6",
                "source": {
                    "type": "git",
  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ

    For whatever reason you must have installed solarium 6.3.6 explicitly.
    Simply remove solarium from composer.json.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    I believe I have not installed solarium/solarium explicitly, by itself, or in a specific version.

    Do you mean the Drupal installation composer.json? Because it is not listed there ... Or do you mean composer.lock?

  • πŸ‡©πŸ‡ͺGermany mkalkbrenner πŸ‡©πŸ‡ͺ

    Never edit composer.lock!

    Edit the top level composer.json.

    I believe I have not installed solarium/solarium explicitly, by itself, or in a specific version.

    You must have done that. A contrib module can't do it.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    It's not present in composer.json, like I wrote:

    Do you mean the Drupal installation composer.json? Because it is not listed there [...]

    $ cat composer.json | grep sol
    "drupal/search_api_solr": "^4.2",
    

    @jmcintyre: Do you remember if you have installed solarium/solarium explicitly, by itself, or can you see it in the composer.json of your Drupal installation?

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    When I tried to update to the 4.3.10 security release for Search API Solr, I still got the "package is fixed by partial update" message, blocking the update.

    I finally just deleted the composer.lock file, ran composer install, and the latest versions were installed of Search API Solr and solarium/solarium.

    Odd that this happened Β―\_(ツ)_/Β― ... anyway, fingers crossed, that it won't happen next time.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Since both @jmcintyre and me have updated our versions, it's no longer relevant for us, and we can close it. It can always be revisited, should it happen again.

Production build 0.71.5 2024