Skip to content

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
@felixarntz felixarntz added this to the Finish the foundation milestone Aug 13, 2025
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.

4 participants