technosophos/libris is abandoned

Created on 1 May 2025, 2 months ago

Problem/Motivation

This module requires the technosophos/libris, which is no longer supported: it is listed as abandoned on Packagist.org.

That page also lists one fork, although it is not recognized as a replacement: researchgate/libris . It is probably worth evaluating it as a replacement.

Steps to reproduce

Check for pending security updates:

composer audit
No security vulnerability advisories found.
Found 1 abandoned package:
+---------------------+----------------------------------------------------------------------------------+
| Abandoned Package   | Suggested Replacement                                                            |
+---------------------+----------------------------------------------------------------------------------+
| technosophos/libris | none                                                                             |
+---------------------+----------------------------------------------------------------------------------+

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

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

Merge Requests

Comments & Activities

  • Issue created by @benjifisher
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Agreed that this is important to review. Setting to "Major."

  • πŸ‡ΊπŸ‡Έ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 mark_fullmer Tucson
  • πŸ‡ΊπŸ‡Έ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 thetesting repository to composer.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
  • πŸ‡ΊπŸ‡Έ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.

  • Pipeline finished with Skipped
    about 17 hours ago
    #537507
  • πŸ‡ΊπŸ‡Έ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 :)

Production build 0.71.5 2024