Skip to content

Fix pre-existing CI breakage: phpcs violations + phantom functional-tests testsuite - #13

Merged
bonelifer merged 3 commits into
mainfrom
fix/phpcs-style-debt
Sep 24, 2026
Merged

bonelifer merged 3 commits into
mainfrom
fix/phpcs-style-debt

Conversation

@bonelifer

@bonelifer bonelifer commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fixes trailing whitespace in language/de/overview.php and a missing blank line after the namespace declaration in ext.php and textreparser/plugins/article_text.php. These were failing the phpcs style-check job on every push to main, blocking the whole DB test matrix from ever running.
  • Removes phpunit.xml.dist's "Extension Functional Tests" testsuite, which declared ./tests/functional/ — a directory that never existed in this extension. This is the config used for local dev, not by the CI matrix jobs, but it was inaccurate either way.
  • Adds tests/functional/.gitkeep. The reusable CI workflow generates each DB matrix job's actual phpunit config by copying phpBB core's own .github/phpunit-*-github.xml template, which always declares a testsuite pointing at ../tests/functional. RUN_FUNCTIONAL_TESTS: 0 only adds --exclude-group functional (a test-group filter) — it doesn't skip declaring that directory, so PHPUnit still requires it to exist before any test runs. Confirmed by reproducing the workflow's exact config-generation step locally and tracing the "Test directory ... not found" error to this. Other phpbbmodders extensions without functional tests instead disable the whole DB matrix (RUN_MYSQL_JOBS: 0, etc.), but this extension has a real DB-backed migration test worth actually running, so this keeps that coverage instead of losing it.

All three are pre-existing and unrelated to any pending feature/docs PR's own content — confirmed by checking main's own CI history, which has been failing on the phpcs step for several commits already.

Test plan

  • php -l on all three phpcs-fixed files: no syntax errors.
  • Ran the same phpcs command CI uses (--standard=build/code_sniffer/ruleset-php-extensions.xml) against the whole extension: clean, no violations.
  • Reproduced the CI workflow's exact sed-based config generation locally against a real phpBB 3.3.x checkout to confirm the root cause of the "Test directory not found" error.
  • Could not fully execute PHPUnit locally past config parsing (this environment's PHP 8.4 hits an unrelated, pre-existing backupGlobals incompatibility with this old phpunit.xml schema before reaching directory discovery), so CI itself is the real verification for the last two fixes.

Investigated and written by Claude on behalf of William Jacoby (bonelifer).

bonelifer and others added 2 commits September 23, 2026 22:45
Trailing whitespace in language/de/overview.php, and a missing blank
line after the namespace declaration in ext.php and
textreparser/plugins/article_text.php, have been failing every CI run
on main regardless of what a given commit actually changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ctory

phpunit.xml.dist declares an "Extension Functional Tests" testsuite
covering ./tests/functional/, but that directory has never existed in
this extension - only tests/migrations/ does. The shared CI workflow's
RUN_FUNCTIONAL_TESTS: 0 only adds --exclude-group functional, which
filters annotated tests but still requires every declared <directory>
to exist, so PHPUnit fails immediately with "Test directory ... not
found" before any test runs, on every DB/PHP matrix job.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bonelifer bonelifer changed the title Fix pre-existing phpcs violations breaking CI on every push Fix pre-existing CI breakage: phpcs violations + phantom functional-tests testsuite Sep 24, 2026
…ion succeeds

The reusable test-framework workflow generates each DB matrix job's
phpunit config by copying phpBB core's own .github/phpunit-*-github.xml
template, which always declares a "phpBB Functional Tests" testsuite
pointing at ../tests/functional. RUN_FUNCTIONAL_TESTS: 0 only adds
--exclude-group functional (a test-group filter), it does not skip
declaring that directory, so PHPUnit still requires it to exist before
any test runs. Confirmed by reproducing the workflow's exact sed-based
config generation locally and tracing the "Test directory ... not
found" error to this.

Other phpbbmodders extensions without functional tests instead disable
the entire DB matrix (RUN_MYSQL_JOBS: 0, etc.), but this extension has
a real DB-backed migration test (tests/migrations/database/
add_article_description_test.php) worth actually running, so keeping
the DB matrix enabled and adding this empty placeholder directory
preserves that coverage instead of losing it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 12dc3bf into main Sep 24, 2026
61 checks passed
@bonelifer
bonelifer deleted the fix/phpcs-style-debt branch September 24, 2026 04:04
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