Conversation
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.
Summary
Introduce an auto-review PHPUnit test suite and run it in CI.
This is inspired by the auto-review test suite in PHP-CS-Fixer, which has been valuable for providing immediate feedback on pull requests and guidance on things that need to be changed before review.
The goal is to build a similar set of automated checks for SMF that can catch project-specific issues that existing tools such as PHPUnit, PHP-CS-Fixer, and Composer validation do not cover.
Changes
Add an
auto-reviewPHPUnit testsuite fortests/AutoReview.Run the auto-review suite as part of the PHP GitHub Actions workflow.
Add
ComposerFileTestto check that:config.platform.phpversion satisfies the declared PHP requirement.Add the standard
tests/AutoReview/index.phpentry point.Motivation
The intention is not to duplicate checks already performed by existing tooling. Instead, the auto-review suite should provide fast, actionable feedback for project-specific conventions and relationships that are difficult or impossible for those tools to validate.
For example, a Composer configuration can be syntactically valid and pass Composer's own validation while still containing a project-specific inconsistency that we want to catch automatically.
This suite can be expanded over time as additional review patterns are identified.
Future direction
Eventually, the auto-review suite should cover a broader range of SMF-specific checks that other automated tools do not catch, providing contributors with immediate feedback and guidance during pull requests rather than discovering these issues later during manual review.