- Issue created by @benjifisher
- πΊπΈUnited States mark_fullmer Tucson
Agreed that this is important to review. Setting to "Major."
- Merge request !39Issue #3522242: technosophos/libris is abandoned; replace with researchgate/libris β (Merged) created by mark_fullmer
- πΊπΈUnited States mark_fullmer Tucson
The library https://github.com/researchgate/libris does indeed seem to be one of the more regularly maintained forked of technosophos/libris, including recent commits for PHP 8.2 support. Given that the latter has not been updated in ~14 years, it is probably worth the "risk" of switching to this fork. Merge request stages the change.
- πΊπΈUnited States benjifisher Boston area
The code change is simple and does what I suggested in the issue summary: that is the R in RTBC.
I will set up a test site and ask someone on my team to do some testing. I am assigning this issue to myself, but if I do not follow up within a week, then feel free to re-assign.
- πΊπΈUnited States benjifisher Boston area
The package is used only in the
bibcite_ris
submodule. Luckily, that is enabled on my team's sites, so we should be able to test it.I notice these lines in
modules/bibcite_ris/src/Encoder/RISEncoder.php
:public function decode($data, $format, array $context = []): mixed { /* * Workaround for weird behavior of "LibRIS" library. * * Replace LF line ends by CRLF. */ $data = str_replace("\n", "\r\n", $data); $config = \Drupal::config('bibcite_entity.mapping.' . $format); $fields = $config->get('fields'); $ris = new RISReader(); $ris->parseString($data); $records = $ris->getRecords(); // Workaround for weird behavior of "LibRIS" library. foreach ($records as &$record) { // ...
From a quick look at the code, it is not obvious how much of that loop is meant as a workaround.
We should investigate whether those workarounds are still needed, or if they actually cause trouble, with the new package. If they do not cause trouble, then we could defer that to a followup issue.
- πΊπΈUnited States benjifisher Boston area
How to test
The only change in the MR for this issue is to
composer.json
, so it takes some work to get Composer to apply the change.I added the
testing
repository tocomposer.json
in my project:"repositories": { "testing": { "type": "git", "url": "https://git.drupalcode.org/issue/bibcite-3522242" }, "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" }, }
Then I ran this from the command line:
ddev composer require -W "drupal/bibcite:dev-3522242-technosophoslibris-is-abandoned as 3.0.x-dev"
I also had to remove some patches that no longer apply. I hope that is because the related issues have been fixed.
- Status changed to RTBC
3 days ago 7:52pm 30 June 2025 - πΊπΈUnited States benjifisher Boston area
My team tested this upgrade, and it looks good:
I just tested by downloading publications from ... in RIS format.
For example, [file in
ris
format]So far, import, export, and rendering of the publications are working as expected. During the import, the RIS tags were correctly mapped to their corresponding fields (e.g., title, keywords, publisher, publication date), consistent with how it worked before the update.
I've tested with 10 publications so far.
This covers the testing (T) and I reviewed the changes (R) in Comment #6, so RTBC.
-
mark_fullmer β
committed b9ddefdb on 3.0.x
Issue #3522242: technosophos/libris is abandoned. Replace with...
-
mark_fullmer β
committed b9ddefdb on 3.0.x
- πΊπΈUnited States mark_fullmer Tucson
This covers the testing (T) and I reviewed the changes (R) in Comment #6, so RTBC.
From one member of the C to another, thank you :)