Skip to content

Take the minimum PHP lint from the shared umbrella [ignore_release] - #657

Merged
snake14 merged 1 commit into
6.x-devfrom
drop-bespoke-min-php-lint
Sep 14, 2026
Merged

snake14 merged 1 commit into
6.x-devfrom
drop-bespoke-min-php-lint

Conversation

@snake14

@snake14 snake14 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Description

Important

Depends on matomo-org/plugin-ci-workflows#14. Merging this before that lands would remove the check entirely rather than move it, so this stays a draft until #14 is merged.

.github/workflows/min-php-lint.yml is a byte-identical copy in three repositories — this one, plugin-ApiReference and plugin-SearchEngineKeywordsPerformance. Once #14 lands, the ci.yml umbrella calls the shared plugin-min-php-lint.yml, so keeping the local copy would run the same check twice under the same job name.

The shared workflow is a superset of this one:

  • it derives the floor from this plugin's own composer.json and plugin.json instead of hardcoding 8.1, so it keeps tracking the declared minimum when that moves;
  • it fails when the lint path exists but contains no PHP, which the local copy passes green — that is what a stale or mistyped path looks like;
  • it follows a symlinked lint path, which the local copy would silently list as empty;
  • it collects the file list before parsing, so a find that fails partway cannot leave a green check over a partial tree;
  • it escapes % and newlines in annotations, so a multi-line parse error is not truncated to its first line.

It also corrects the remediation advice. The local copy says "Re-run the scoper", but matomo-scoper prefixes without downgrading, so re-running it changes nothing; the shared one points at the two things that do fix it — lower config.platform.php and re-resolve, or raise require.php if the declared floor is stale.

No behaviour is lost: the job keeps the same name, and this plugin's floor resolves to the same 8.1 the local copy hardcoded.

Issue No

No GitHub issue.

Steps to Replicate the Issue

  1. Merge Lint scoped dependencies at the floor the plugin actually declares plugin-ci-workflows#14 and look at a pull request here.
  2. Expected result: the minimum PHP lint runs once.
  3. Actual result: it runs twice, once from the umbrella and once from the local copy.

Checklist

  • [✔] Tested locally or on demo2/demo3?
  • [NA] New test case added/updated?
  • [NA] Are all newly added texts included via translation?
  • [NA] Are text sanitized properly? (Eg use of v-text v/s v-html for vue)
  • [NA] Version bumped?
  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules
  • [NA] Documentation updated?

This workflow is a byte-identical copy in three repositories, and the umbrella now calls the shared plugin-min-php-lint.yml, so keeping it would run the same check twice. The shared one derives the floor from this plugin composer.json and plugin.json instead of hardcoding 8.1, fails when the lint path exists but holds no PHP, follows a symlinked path, and does not tell the maintainer to re-run the scoper -- the scoper prefixes but does not downgrade, so that advice was a no-op.
@snake14
snake14 marked this pull request as ready for review September 14, 2026 21:19
@snake14
snake14 requested a review from a team September 14, 2026 21:19
@snake14
snake14 enabled auto-merge (squash) September 14, 2026 21:19
@snake14
snake14 merged commit d31b6b0 into 6.x-dev Sep 14, 2026
23 of 24 checks passed
@snake14
snake14 deleted the drop-bespoke-min-php-lint branch September 14, 2026 21:42
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.

2 participants