Problem/Motivation

This project includes a composer.json file that declares "license": "GPL-2.0+" (code hosted on Drupal.org must be licensed GPL 2.0 or later).

Composer has a CLI command called "validate" to check if a composer.json file is valid. When running it on my project, I see...

$ composer validate -A
  ... a bunch of output for my root composer.json and other modules I have installed ...
drupal/views_data_export is valid, but with a few warnings
# General warnings
- License "GPL-2.0+" is a deprecated SPDX license identifier, use "GPL-2.0-or-later" instead
  ... a bunch more output for other modules I have installed ...

I see the SPDX list of licenses shows GPL-2.0+ in the deprecated list.

Steps to reproduce

  1. Make sure you are running at least composer version 2.1 (tested on composer 2.7.0 on 2024-02-08): composer --version
  2. Create a Drupal project: composer create-project drupal/recommended-project:10.2.3 "3209680-testing"
  3. Change to the Drupal project directory: cd 3209680-testing
  4. Install the latest version of views_data_export: composer require --prefer-install=source 'drupal/views_data_export:dev-8.x-1.x@dev'
  5. Run composer validate -A (look for drupal/views_data_export in the output
    • Expected behavior: drupal/views_data_export is valid
    • Actual behavior:
      drupal/views_data_export is valid, but with a few warnings
      # General warnings
      - License "GPL-2.0+" is a deprecated SPDX license identifier, use "GPL-2.0-or-later" instead

Proposed resolution

Modify /composer.json, changing "license": "GPL-2.0+", to "license": "GPL-2.0-or-later",.

Remaining tasks

  1. Write a patch (done by @voleger in #2)
  2. Review and feedback (done by @mparker17 in #4)
  3. RTBC and feedback
  4. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Command icon 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

voleger created an issue. See original summary.

voleger’s picture

Status: Active » Needs review

Added changes in MR!1

mparker17’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

I'm also seeing this when I run composer validate -A on my project...

$ composer validate -A
...
drupal/views_data_export is valid, but with a few warnings
# General warnings
- License "GPL-2.0+" is a deprecated SPDX license identifier, use "GPL-2.0-or-later" instead
...

I can confirm that the merge request in #1 would fix it. I think the test failure is unrelated to the changes in this merge request.

(aside, I've requested a composer.json linter so composer.json issues like this show up in the Drupal.org GitLab CI linter: #3417108: Create Drupal.org-specific composer.json linter, if anyone's interested in contributing to fixing this for all d.o projects)

Steven Jones made their first commit to this issue’s fork.

  • Steven Jones committed f6936c62 on 8.x-1.x authored by voleger
    Issue #3209680 by voleger, mparker17: License "GPL-2.0+" is a deprecated...
steven jones’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the issue, fix and review!

Status: Fixed » Closed (fixed)

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