Skip to content

test: Add PHPUnit harness and require PHP 8.1 - #28

Merged
Ibochkarev merged 4 commits into
masterfrom
test/phpunit-harness
Sep 2, 2026
Merged

Ibochkarev merged 4 commits into
masterfrom
test/phpunit-harness

Conversation

@Ibochkarev

Copy link
Copy Markdown
Member

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.

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
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.
@Ibochkarev Ibochkarev self-assigned this Sep 2, 2026
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.
@Ibochkarev
Ibochkarev merged commit f6c109c into master Sep 2, 2026
27 of 28 checks passed
@Ibochkarev
Ibochkarev deleted the test/phpunit-harness branch September 2, 2026 06:15
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.

1 participant