Hello:

Cannot use the coposer installation

error:
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/radioactivity ^4.0 -> satisfiable by drupal/radioactivity[4.0.0, 4.0.1, 4.0.2, 4.0.3].
- drupal/radioactivity[4.0.0, ..., 4.0.3] require drupal/core ^9 -> found drupal/core[9.0.0, ..., 9.5.2] but the package is fixed to 10.0.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.

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

msn5158 created an issue. See original summary.

sutharsan’s picture

Status: Active » Postponed (maintainer needs more info)

@msn5158, can you describe the situation in which this occurs? Preferably in the form of steps to reproduce?

msn5158’s picture

StatusFileSize
new22.98 KB

I capture a picture:
1

msn5158’s picture

Title: Cannot use the coposer installation » Cannot use the composer installation
arisen’s picture

Component: Miscellaneous » Code
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new354.53 KB

Tried composer installation of the module on drupal 10.0.0. It works.
But looks like for me it doesn't install the stable release of the module instead it installs from the dev branch 4.0.x.
Check the attached screenshot. Confirmed the same in the composer.lock.

Probably adding "prefer-stable": true in the root composer should solve the above issue.

biguzis’s picture

Status: Needs review » Reviewed & tested by the community

This is because 4.0.3 version doesn't allow to use D10 from composer.json side. Dev version contains "^9 || ^10" and it allowed it to install for @arisen.
Fix would be to create a new release for proper D10 support. Till then - composer require drupal/radioactivity:^4.0.0@dev

bobooon’s picture

StatusFileSize
new309 bytes

For those who need this now without installing a dev version. Use this patch along with drupal-lenient on version 4.0.3.

sutharsan’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

Version 4.0.3 was released with core_version_requirement: ^9 || ^10. Is this issue still now resolved?

Please mark this issue 'closed' when it is resolved.

dinarcon’s picture

Status: Postponed (maintainer needs more info) » Active

This is still an issue. Version 4.0.3 contains core_version_requirement: ^9 || ^10 in the radioactivity.info.yml file, but the issue reported here is not being able to add the module via Composer. That is because 4.0.3 does not declare Drupal 10 compatibility in the composer.json file. See https://git.drupalcode.org/project/radioactivity/-/blob/4.0.3/composer.j...

This has already been fixed in https://git.drupalcode.org/project/radioactivity/-/commit/5b0200bc08ca66..., but that commit was not part of the 4.0.3 release.

Doing what is described in #6 or #7 allows the module to be installed. Tagging a new release would be very much appreciated.

ccjjmartin’s picture

I can confirm that the only thing needed here is a new tagged release as the latest dev branch has the necessary required change. The release as of 4.0.3 did not have the required change in the composer.json file, notice the lack of or Drupal 10: https://git.drupalcode.org/project/radioactivity/-/blob/fa9651f23d6a5ee1...

arkener’s picture

Also running into this issue. Can we get a new tag so this issue resolves itself? The project page currently defines 4.0.3 as having D10 support, so releasing a new tag might fix some confusion.

tr’s picture

Status: Active » Fixed

I tagged a 4.0.4 release for this purpose, and verified it does install on Drupal 10 using composer.

Note, that I will shortly be creating a 4.1.x branch that will be used for Drupal 11 support. The changes being made subsequent to the 4.0.4 release are significant enough that it warrants a new minor version.

Support for Drupal 9 has ended. The 4.0.4 release is still listed as Drupal 9 compatible, but there will be no new releases in the 4.0.x series going forward.

After I get all the tests working on 4.1.x and get the code to a stable release condition, I will release 4.1.0 as the recommended release for Drupal ^10.3 and Drupal ^11.

Status: Fixed » Closed (fixed)

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