Skip to content

ci: fix bootstrap-unit.php redeclare fatal, add coverage driver, document PHP 8.2 floor - #243

Merged
TheWitness merged 1 commit into
developfrom
ci/fix-bootstrap-redeclare-and-php-floor
Sep 19, 2026
Merged

TheWitness merged 1 commit into
developfrom
ci/fix-bootstrap-redeclare-and-php-floor

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

Follow-up to the CI rebuild (#236), addressing review comments that are still valid against develop (the default branch):

  • tests/bootstrap-unit.php: removed the global validateRequestVars() stub. monitor_controller.php declares this function unconditionally, so once a test loads plugin source through TestCase::loadPluginSource()/monitor_test_load(), the stub causes a Cannot redeclare validateRequestVars() fatal. No test currently calls the stub directly, so removing it is safe.
  • .github/workflows/plugin-ci-workflow.yml: added coverage: pcov to the setup-php step. The Pest run already requests --coverage-clover, but no coverage driver was installed, so the coverage report could silently fail to generate.
  • Documented the PHP 8.2 floor (the matrix is already ['8.2', '8.3', '8.4']) in .github/copilot-instructions.md, .github/agents/php-developer.agent.md, and docs/architecture/0001-hexagonal-monitor.md, all of which still referenced PHP 8.1.

Not changed

  • Apache in "Install System Dependencies": verified this is not broken as-is. apache2 ships preinstalled on the ubuntu-latest GitHub-hosted runner image, and shivammathur/setup-php configures the matching libapache2-mod-php module for the selected matrix PHP version. Re-adding an explicit apt-get install apache2 libapache2-mod-php step would be redundant.
  • PHP 8.1 in the test matrix: dropping it is intentional now that the project's floor is PHP 8.2 (reflected in the doc updates above), so no replacement 8.1 compatibility job was added.

…r to 8.2

- tests/bootstrap-unit.php: stop stubbing validateRequestVars() globally; monitor_controller.php declares it unconditionally, so the stub caused a Cannot redeclare fatal once a test loaded plugin source via loadPluginSource()/monitor_test_load().
- .github/workflows/plugin-ci-workflow.yml: add coverage: pcov to the setup-php step so the Pest --coverage-clover report has a driver to run against.
- Document the PHP 8.2 floor (matrix is already 8.2-8.4) in copilot-instructions.md, the php-developer agent, and the hexagonal-monitor ADR, replacing stale PHP 8.1 references now that PHP 8.1 is no longer tested.
- Verified apache2/libapache2-mod-php do not need to be re-added to the Install System Dependencies step: apache2 ships preinstalled on the ubuntu-latest runner image and shivammathur/setup-php configures the matching Apache PHP module for the selected matrix version.
Copilot AI lite review requested due to automatic review settings September 19, 2026 14:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review comments remain, and the CI and documentation updates are aligned.

Review effort: Lite
Findings: None

What changed in this PR

This PR fixes a test bootstrap redeclaration issue, enables PCOV coverage, and updates documentation for the PHP 8.2 minimum.

Changes:

  • Removes the conflicting validateRequestVars() stub.
  • Enables PCOV for Clover coverage generation.
  • Updates PHP version guidance to 8.2+.
File Changes
tests/​bootstrap-unit.php Removes the conflicting validation stub.
docs/​architecture/​0001-hexagonal-monitor.md Updates the PHP 8.2 baseline.
.github/​workflows/​plugin-ci-workflow.yml Enables PCOV coverage.
.github/​copilot-instructions.md Documents the PHP 8.2 floor.
.github/​agents/​php-developer.agent.md Updates PHP support guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@TheWitness
TheWitness merged commit f1eef20 into develop Sep 19, 2026
6 checks passed
@TheWitness
TheWitness deleted the ci/fix-bootstrap-redeclare-and-php-floor branch September 19, 2026 18:56
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.

4 participants