Skip to content

Add PHP lint workflow #22

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

Merged
merged 2 commits into from
Jul 15, 2025
Merged

Add PHP lint workflow #22

merged 2 commits into from
Jul 15, 2025

Conversation

borkweb
Copy link
Contributor

@borkweb borkweb commented Jul 14, 2025

Adds GitHub Actions workflow to validate PHP syntax with PHPStan and PHPCS. The workflow runs on push and pull requests - the tools execute with the latest PHP version while PHPStan will validate the code against the version of PHP specified in composer.json (which is PHP 7.4).

(I used WordPress/plugin-check for reference)

Adds GitHub Actions workflow to validate PHP syntax across all PHP files in the repository. The workflow runs on push and pull requests, checking PHP 7.4 and 8.0 compatibility.
Comment on lines +5 to +8
branches:
- trunk
- 'feature/**'
- 'release/**'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borkweb Any reason we wouldn't just lint for any branch? I'm not confident folks will follow the prefixed conventions here.

Copy link
Contributor Author

@borkweb borkweb Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's section is just for push without a PR to save on action usage. The Pull Request section makes it run on any branch whether it is the original PR or a push (synchronization) of additional commits to that PR.

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borkweb Thanks, looks great!

Just a few non-blocking thoughts.

@borkweb borkweb merged commit 980d178 into trunk Jul 15, 2025
1 check passed
@borkweb borkweb deleted the add/php-lint-workflow branch July 15, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants