Problem/Motivation

Using Leaflet v10.3.12 on a D11.3.2 instance equipped with PHP 8.4.16, the latest version v10.4.0 cannot be installed via Composer.

Steps to reproduce

composer update -W
composer require 'drupal/leaflet:^10.4'

Detail of the attempts to upgrade and then install Leaflet v10.4.0:

user@server:~/public_html$ composer update -W
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
48 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
user@server:~/public_html$ composer require 'drupal/leaflet:^10.4'
./composer.json has been updated
Running composer update drupal/leaflet
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/leaflet ^10.4 -> satisfiable by drupal/leaflet[10.4.0].
    - drupal/leaflet 10.4.0 requires drupal/core ^10.3 || 11 -> found drupal/core[10.3.0, ..., 10.6.2, 11.0.0] but the package is fixed to 11.3.2 (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.
  Problem 2
    - drupal/leaflet_more_markers is locked to version 1.1.3 and an update of this package was not requested.
    - drupal/leaflet 10.4.0 requires drupal/core ^10.3 || 11 -> found drupal/core[10.3.0, ..., 10.6.2, 11.0.0] but the package is fixed to 11.3.2 (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.
    - drupal/leaflet_more_markers 1.1.3 requires drupal/leaflet * -> satisfiable by drupal/leaflet[10.4.0].

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.

Comments

gillesbailleux created an issue. See original summary.

gillesbailleux’s picture

StatusFileSize
new5.54 KB

The composer.json file (in .txt format) shows the use of Leaflet related modules.

gillesbailleux’s picture

The Geofield module v10.3.0 remains in the module list though it is not present in the composer.json file.

itamair’s picture

Status: Active » Needs review

thx @gillesbailleux, nice catch.
New Leaflet module version 10.4.1 should have fixed this issue.
Please confirm it, eventually.

camhoward’s picture

Having a similar problem updating Leaflet from 10.3.12 to 10.4.0 or 10.4.1.

Site is using Drupal 11.3.2 and PHP 8.4.10.

Getting the same "Problem 1" error message reported by @gillesbailleux.

composer.json reports:

"drupal/geofield": "^10.3",
"drupal/leaflet": "^10.2",

composer.lock reports:

"name": "drupal/geofield",
            "version": "10.3.0",
"name": "drupal/leaflet",
            "version": "10.3.12",

I'm not sure why the composer.json version for leaflet is lower than the composer.lock file.

Drupal's available updates page reports:

  • Geofield 10.3.0
  • Leaflet 10.3.12
gillesbailleux’s picture

Status: Needs review » Active

Greetings Italo,

Performing the composer update -W command installs Leaflet v10.4.1 gracefully.

Now, the available updates warns me that geofield module v10.3.1 is available but it is not installed. Performing composer update -W and composer require 'drupal/geofield:^10.3' do not install the module as shown below:

user@server:~/public_html$ composer update -W
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading drupal/leaflet (10.3.12 => 10.4.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downloading drupal/leaflet (10.4.1)
  - Upgrading drupal/leaflet (10.3.12 => 10.4.1): Extracting archive
Generating autoload files
48 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
user@server:~/public_html$ cd web
user@server:~/public_html/web$ ../vendor/drush/drush/drush updb
 [success] No pending updates.
user@server:~/public_html/web$ cd ..
user@server:~/public_html$ composer update -W
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
48 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
user@server:~/public_html$ composer require 'drupal/geofield:^10.3'
./composer.json has been updated
Running composer update drupal/geofield
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
48 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.

Do I have to open an issue on the Geofield issue list?

gillesbailleux’s picture

The latest Geofield version appears in the Drupal Available updates section.

gillesbailleux’s picture

StatusFileSize
new5.57 KB

The geofield_module is now in the updated composer.json file.

gillesbailleux’s picture

Status: Active » Fixed

I mark this issue as fixed as the leaflet_module v10.4.1 is installed.

The issue related to the 10.3.1 version of the geofield_module is in this issue: https://www.drupal.org/project/geofield/issues/3566835

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

camhoward’s picture

Status: Fixed » Needs review

I tried again several hours after my first three attempts and Leaflet 10.4.1 is now installed.

Is there a delay between the time a new version displays on the project page the and site's "Available updates" page and the time Composer can access it?

Thanks!

itamair’s picture

Status: Needs review » Fixed

yes, sorry @gillesbailleux for this also, but I am providing general updates to these modules that align with Drupal core version ^10.3 || ^11

The new geofield 10.3.2 release should now be correctly installable.
Ref: https://www.drupal.org/project/geofield/issues/3566835#comment-16407629

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

gillesbailleux’s picture

Greetings @itamair,

The v10.3.2 of the geofield_module is installed and works as designed so I marked the issue I created as fixed: https://www.drupal.org/project/geofield/issues/3566835#comment-16407651

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.