test: Add PHPUnit harness and require PHP 8.1 - #28
Merged
Merged
Conversation
Stand testing is slow. Add Fenom-style unit tests and skippable MODX integration, plus CI on 8.1 through 8.4. PHP 8.1 is the floor so we can depend on current MODX 3.2.
Ibochkarev
marked this pull request as ready for review
September 2, 2026 05:58
PHPUnit already loads the workspace vendor. MODX then includes the installed copy and Composer fatals on the same AutoloaderInit class.
class_exists(..., false) was always false in PHPUnit: the workspace Composer dump is registered but CoreTools is not yet loaded.
Informational project/patch checks and PR comments when coverage changes. Fail the Coverage job if the upload is rejected.
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.
What
Add a PHPUnit 9.6 harness with unit tests and skippable MODX integration. CI runs lint, unit, and integration on PHP 8.1, 8.2, 8.3, and 8.4, plus a coverage job. The package now requires PHP 8.1+. require-dev pins MODX 3.2.4-pl. Release and test workflows download that zip.
Why
We test on a stand today. These tests cover CoreTools, Fetch, Fenom, and the crumbs/page cases without HTTP. Integration runs in CI after a real MODX install with PKG_AUTO_INSTALL.
Current MODX 3.2 needs PHP 8.1. 3.x-dev tracks 3.2, so the old 7.2/7.4 floor blocked that pin.