Skip to content

Add PHP test + QA harness (Docker testbed, PHPStan/Rector, CI) - #1

Merged
erikfrerejean merged 6 commits into
6from
test-ci-harness
Jul 3, 2026
Merged

Add PHP test + QA harness (Docker testbed, PHPStan/Rector, CI)#1
erikfrerejean merged 6 commits into
6from
test-ci-harness

Conversation

@erikfrerejean

Copy link
Copy Markdown
Member

Stands up the module's PHP test + QA pipeline from the start, modelled on silverstripe-grid but trimmed to a unit/sapphire-only module (no webserver, Playwright, JS, or Fluent).

What's included

  • Docker testbed (.docker/): php-cli container + MySQL running the module symlinked into a SilverStripe 6 recipe-cms testbed via a Composer path repo. No FrankenPHP/webserver.
  • QA configs: PHPUnit (unit+integration suites), PHPStan level: max + 100% type-coverage, a second PHPStan pass pinned to the PHP 8.5 target, and Rector (SS6 rule set).
  • Taskfile.yml: test/analyse/analyse-php85/rector/coverage/coverage-check etc.
  • 90% coverage gate (pcov + coverage-check).
  • CI (.github/workflows/ci.yml): static-analysis + php-qa matrix across PHP 8.3/8.4/8.5 (coverage gate on 8.3), plus the Docker Hub mirror action and Dependabot.

Task fix surfaced by the harness

GenerateTinyMCECombinedTask referenced pre-SS6 TinyMCE FQCNs (SilverStripe\Forms\HTMLEditor\TinyMCE*). SS6 extracted these to SilverStripe\TinyMCE\* (package silverstripe/htmleditor-tinymce). This PR adds that dependency, corrects the imports, and adds an integration test proving the task runs. A follow-up static-analysis finding (getScriptURL() requires TinyMCEConfig) is handled with an instanceof guard + a covering test.

Coverage 100%; all static gates green locally.

@erikfrerejean
erikfrerejean merged commit c764e1f into 6 Jul 3, 2026
4 checks passed
@erikfrerejean
erikfrerejean deleted the test-ci-harness branch July 3, 2026 13:46
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