Skip to content

Add PCOV to PHP 8.0-8.5 images#210

Open
desrosj wants to merge 6 commits into
trunkfrom
add/pcov
Open

Add PCOV to PHP 8.0-8.5 images#210
desrosj wants to merge 6 commits into
trunkfrom
add/pcov

Conversation

@desrosj
Copy link
Copy Markdown
Member

@desrosj desrosj commented May 15, 2026

wordpress-develop is looking to switch off of xDebug for generating code coverage reports in favor of using PCOV (see WordPress/wordpress-develop#11618). While it's possible to install and configure PCOV in the GitHub Actions workflow file that generates coverage reports, it would be nice to have this pre-installed within the Docker containers so that a contributor could easily use PCOV locally.

This introduces PCOV into all non-legacy PHP images (currently 7.4-8.5).

Note: This is blocked by #209. In order to not include the changes to common.sh in the 7.2 & 7.3 containers, those must be moved to legacy first or the workflows will fail due to the presence of uncommitted changes to versioned files after running php update.php.

@desrosj desrosj requested a review from johnbillion May 15, 2026 17:19
@desrosj desrosj self-assigned this May 15, 2026
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the PCOV PECL extension to the WordPress development PHP Docker images so contributors can generate code coverage locally without relying on Xdebug.

Changes:

  • Add pcov to the PECL extensions installed in generated PHP images (via update.php).
  • Install PCOV in the generated Dockerfiles for the targeted PHP versions.
  • Add an entrypoint toggle (LOCAL_PHP_PCOV=true) to enable/disable the PCOV extension at runtime.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
update.php Adds pcov to the pecl_extensions list so generated PHP Dockerfiles install it.
entrypoint/common.sh Adds LOCAL_PHP_PCOV handling to enable/disable the PCOV extension at container start.
images/7.4/php/Dockerfile Installs PCOV via pecl install pcov.
images/7.4/php/common.sh Adds LOCAL_PHP_PCOV handling for the 7.4 image runtime.
images/8.0/php/Dockerfile Installs PCOV via pecl install pcov.
images/8.0/php/common.sh Adds LOCAL_PHP_PCOV handling for the 8.0 image runtime.
images/8.1/php/Dockerfile Installs PCOV via pecl install pcov.
images/8.1/php/common.sh Adds LOCAL_PHP_PCOV handling for the 8.1 image runtime.
images/8.2/php/Dockerfile Installs PCOV via pecl install pcov.
images/8.2/php/common.sh Adds LOCAL_PHP_PCOV handling for the 8.2 image runtime.
images/8.3/php/Dockerfile Installs PCOV via pecl install pcov.
images/8.3/php/common.sh Adds LOCAL_PHP_PCOV handling for the 8.3 image runtime.
images/8.4/php/Dockerfile Installs PCOV via pecl install pcov.
images/8.4/php/common.sh Adds LOCAL_PHP_PCOV handling for the 8.4 image runtime.
images/8.5/php/Dockerfile Installs PCOV via pecl install pcov.
images/8.5/php/common.sh Adds LOCAL_PHP_PCOV handling for the 8.5 image runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread update.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants