Skip to content

Add pcov extension in dockerfiles and slic pcov command#246

Merged
defunctl merged 6 commits into
mainfrom
release/2.3.0
Jun 25, 2026
Merged

Add pcov extension in dockerfiles and slic pcov command#246
defunctl merged 6 commits into
mainfrom
release/2.3.0

Conversation

@defunctl

@defunctl defunctl commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds PCOV support to SLIC so projects can generate code coverage faster than Xdebug-backed coverage.

This adds PCOV to both the slic and wordpress containers, keeps it disabled by default, and introduces a new slic pcov command for enabling, disabling, and checking PCOV state.

Changes

  • Adds PCOV to the SLIC and WordPress Docker images.
  • Adds slic pcov on|off|status with detection of xdebug and ability to disable it.
    Updatesslic xdebug` to also check if pcov is enabled.
  • Persists desired PCOV state through PCOV_ENABLED.
  • Applies PCOV state immediately to running containers.
  • Applies PCOV state on container startup.
  • Preserves the upstream WordPress image ENTRYPOINT.
  • Adds pcovon and pcovoff helpers inside slic shell.
  • Updates README and SLIC skill docs.
  • Bumps SLIC to 2.3.0.
  • Build the images on release/x.x.x branches in addition to just x.x.x branches that already existed.

Example Usage

slic pcov on
slic run wpunit --coverage --coverage-xml clover.xml --disable-coverage-php
slic pcov off

Example composer.json scripts:

{
  "scripts": {
    "test:coverage": [
      "slic pcov on --yes",
      "slic run wpunit --coverage --coverage-xml clover.xml --disable-coverage-php",
      "slic pcov off"
    ],
    "test:coverage-html": [
      "slic pcov on --yes",
      "slic run wpunit --coverage --coverage-html coverage --disable-coverage-php",
      "slic pcov off"
    ]
  }
}

Notes

PCOV is intended for coverage generation only. Xdebug remains available for debugging through the existing slic xdebug command.

The WordPress image keeps the upstream docker-entrypoint.sh flow intact. PCOV state is applied through the apache2-foreground command path so WordPress initialization behavior remains owned by the base image.

Verification

  • php -l slic.php
  • php -l src/slic.php
  • php -l src/commands/pcov.php
  • git diff --check
  • Built SLIC PHP 7.4 image
  • Built WordPress PHP 7.4 image
  • Verified PCOV on/off behavior
  • Verified PCOV_ENABLED=1 is honored at container startup

@defunctl defunctl added this to the 2.3.0 milestone Jun 24, 2026
@defunctl
defunctl requested a review from dpanta94 June 24, 2026 21:39
@defunctl defunctl self-assigned this Jun 24, 2026
@defunctl
defunctl merged commit f20234b into main Jun 25, 2026
48 checks passed
@defunctl
defunctl deleted the release/2.3.0 branch June 25, 2026 19:17
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.

2 participants