PRESS0-4271 Add PHP syntax check (php -l) to CI workflows for all PHP files#221
Open
vikasrana1998 wants to merge 14 commits into
Open
PRESS0-4271 Add PHP syntax check (php -l) to CI workflows for all PHP files#221vikasrana1998 wants to merge 14 commits into
php -l) to CI workflows for all PHP files#221vikasrana1998 wants to merge 14 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a reusable GitHub Actions workflow to run php -l against PHP files, enabling PHP syntax validation in CI for repositories that call this workflow.
Changes:
- Introduces a new reusable workflow (
workflow_call) for PHP syntax linting with configurable PHP version. - Implements scope logic to lint either PR-changed PHP files (default on PRs) or all PHP files (default otherwise).
- Adds path-prefix exclusions via a
paths-ignoreinput to avoid linting dependency directories (e.g.,vendor,node_modules).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… reusable-codecoverage.yml)
- Use git merge-base for changed-files diff so we only lint commits
introduced by the PR, matching GitHub's "Files changed" view even
when the base branch has advanced
- Surface git diff failures gracefully: fall back to scope=all with
a ::notice:: instead of silently producing an empty file list
- Use `set -euo pipefail` in the lint step so unexpected errors
(e.g. missing FILES_LIST) fail the job rather than reporting success
- Group repeated >> "$GITHUB_OUTPUT" redirects into { ...; } >> file
to satisfy shellcheck SC2129 and fix the actionlint CI failure
Co-authored-by: Cursor <cursoragent@cursor.com>
f6c2d00 to
93e85ac
Compare
arunshenoy99
previously approved these changes
May 8, 2026
wpscholar
previously approved these changes
Jun 15, 2026
AI code review✅ Strengths
|
cacee7d
- Bump setup-php pin to v2.37.2 to resolve zizmor known-vulnerable-actions - Match paths-ignore recursively for nested vendor/node_modules directories - Fix checkout show-progress to use runner.debug boolean directly
Deduplicate and case-insensitively match PHP files, escape workflow annotations, include php -l error text in annotations, gate verbose file listing behind debug mode, and add step summary output.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Proposed changes
Type of Change
Production
Development
Visual
Checklist
Further comments