Problem/Motivation
In July 2023, Bibliography & Citation updated to 3.0@beta which is compatible with Drupal 10.0. The composer.json looks for 1.0 or 2.0 bibcite and will not install. It also looks for Drupal 9.0.
Steps to reproduce
Attempting to install the pubmed module using, composer require -W 'drupal/bibcite_pubmed:^2.0@alpha' or composer require 'drupal/bibcite_pubmed:^2.0@alpha' fails with the error message:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/bibcite_pubmed ^2.0@alpha -> satisfiable by drupal/bibcite_pubmed[2.0.0-alpha1].
- drupal/bibcite_pubmed 2.0.0-alpha1 requires drupal/bibcite ^1.0|^2.0 -> found drupal/bibcite[2.0.0-beta1, 2.0.0-beta2, 2.0.0-beta3] but it conflicts with your root composer.json require (^3.0@beta).
Proposed resolution
Change installation to accept ^3.0 and Drupal 10.0
| Comment | File | Size | Author |
|---|
Issue fork bibcite_pubmed-3384680
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mohd sahzad commentedi have fixed this issue Not compatible with Drupal 10 and bibcite3.0
Comment #3
spenecer commentedIf the bibcite_pubmed is enabled after using this patch, then the website throws a 500 Internal server error for every page. No pages resolve and are blank.
Comment #4
mohd sahzad commentedComment #5
mohd sahzad commentedComment #6
mohd sahzad commentedI think bibcite3.0 version not available, that's why got this error: website throws a 500 Internal server error for every page. No pages resolve and are blank.
Comment #7
spenecer commentedI think the problem is that this module is not compatible with Drupal 10. It isn't just a problem that can be solved by changing the composer install requirements.
Comment #10
bkosborneI created a merge request which adds compatibility with Drupal 10 and drops compatibility with Drupal 9, just like the Bibcite 3.0.x branch. I don't think it's possible (or maybe not practical/worth it) to support both versions due to a class method we overriding having different signatures in each major Drupal version.
It's likely that even with this patch, users won't be able to update to Bibcite 3.x because this module currently declares support only for Bibcite 1.x and 2.x via its composer.json file. Even though this patch addresses that issue, composer doesn't look at the patched version of composer.json when determining the dependency tree.
A workaround for this is to masquerade bibcite 3.x as 2.x in your project's composer.json file:
"drupal/bibcite": "3.0.0-beta3 as 2.0.0-beta3",This will install the 3.0.0-beta3, but it will treat it as if it were version 2.0.0-beta3 for dependency resolution.
Of course the best action here is to commit this merge request, ideally as a new major version.
Comment #11
bkosborneHiding patch file from previous work to avoid confusion
Comment #15
hxdef commented