chore(license): put the SPDX identifier first in the NamedParametersSniff @license tag - #20
Merged
rubenvdlinde merged 1 commit intoAug 5, 2026
Conversation
…niff @license tag The tag read `@license <eupl-url> EUPL-1.2` — URL first, SPDX identifier second. Hydra gate-28 (license-triangle) reads the licence with `awk '{print $3}'`, i.e. the FIRST token after @license, so this shape resolves to the URL and compares unequal to composer.json's "EUPL-1.2". Swapped to the fleet shape: * @license EUPL-1.2 https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 The licence named is unchanged — this is a field-order fix, not a relicence. Note: this repo has no lib/ directory, so gate-28 examines zero files here and its PASS is vacuous. Verified against a synthetic control that the URL-first shape does fail gate-28 when the same file sits under lib/. Static analysis (lint, phpcs, phpmd, psalm, phpstan) clean before and after. This repo has no test suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
phpcs-custom-sniffs/CustomSniffs/Sniffs/Functions/NamedParametersSniff.phpdeclared:URL first, SPDX identifier second. Hydra gate-28 (license-triangle) extracts the
licence with
awk '{print $3}'— the first token after@license— so this shaperesolves to the URL and compares unequal to
composer.json's"EUPL-1.2".Swapped to the fleet shape:
The licence named is unchanged. This is a field-order fix, not a relicence.
Honest note on the gate
This repo has no
lib/directory, so gate-28 iterates zero files and emits PASSwithout examining anything — its PASS is vacuous and is not evidence that this header
was correct. I verified the defect is real with a synthetic control: the identical
URL-first shape placed under
lib/producesand passes once swapped. Fixed here because it is the right declaration regardless of
whether the gate can currently see it.
Deliberately NOT changed
analysis-bootstrap.php— already@license EUPL-1.2(SPDX first). Correct; not churnedto add the URL.
LICENSE:177— "GNU Affero General Public License (AGPL) v. 3" is an entry in theEUPL-1.2's own Appendix of compatible licences, not a declaration.
ex_app/lib/main.py— the actual Python application carries no licence header at all.Adding one is out of scope for a normalisation sweep; flagged for the repo owners.
@copyright/SPDX-FileCopyrightTextlines.Verification
This repo has no test suite —
composer.jsonstates this explicitly. The nearestequivalent, run identically before and after under PHP 8.5 in a container (host PHP is
8.2, below this repo's
^8.3):php -l(all PHP)