Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis/Build: validate the composer.json file #571

Merged
merged 1 commit into from Jan 14, 2018

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jan 14, 2018

Validate the composer.json file on each build.
Ref: https://getcomposer.org/doc/03-cli.md#validate

Also updates the license identifier in the composer.json file to LGPL-3.0-or-later (see more about this below).

The license could also be limited to just LGPL 3.0 by using LGPL-3.0-only.
@wimg Let me know if that would be preferred.

Notes:

  • This check has not been restricted to a specific PHP version as there may be different versions of Composer being run on different Travis PHP images, so validating the file once against each PHP/Composer combi should make sure the file is properly validated.
  • --strict checking is disabled with reason. As of Composer 1.6.0, the SPDX license identifiers v3.0 for GPL/LGPL/AGPL are supported and the old license identifiers are deprecated.
    So using the "new" license identifier would fail the validation for Composer < 1.6.0, using the old license identifier would fail the validation for Composer 1.6.0+. By ignoring warnings, this issue is bypassed.

Refs:

Validate the composer.json file on each build.
Ref: https://getcomposer.org/doc/03-cli.md#validate

Also updates the license identifier in the `composer.json` file.

Notes:
* This check has not been restricted to a specific PHP version as there may be different versions of Composer being run on different Travis PHP images, so validating the file once against each PHP/Composer combi should make sure the file is properly validated.
* `--strict` checking is disabled with reason. As of Composer 1.6.0, the SPDX license identifiers v3.0 for GPL/LGPL/AGPL are supported and the old license identifiers are deprecated.
    So using the "new" license identifier would fail the validation for Composer < 1.6.0, using the old license idenfifier would fail the validation for Composer 1.6.0+. By ignoring warnings, this issue is bypassed.

Refs:
* https://github.com/composer/composer/releases/tag/1.6.0
* https://spdx.org/news/news/2018/01/license-list-30-released
@jrfnl jrfnl added this to the 8.1.1 milestone Jan 14, 2018
@jrfnl jrfnl requested a review from wimg January 14, 2018 02:21
@wimg wimg merged commit b0372d7 into master Jan 14, 2018
@wimg wimg deleted the feature/travis-validate-composer.json branch January 14, 2018 05:20
@jrfnl jrfnl added the chores/QA label Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants