close
Skip to content

Use PCOV preinstalled within PHP Docker container#11949

Open
desrosj wants to merge 3 commits into
WordPress:trunkfrom
desrosj:use-pcov-within-docker-container
Open

Use PCOV preinstalled within PHP Docker container#11949
desrosj wants to merge 3 commits into
WordPress:trunkfrom
desrosj:use-pcov-within-docker-container

Conversation

@desrosj
Copy link
Copy Markdown
Member

@desrosj desrosj commented May 22, 2026

This switches from manually installing PCOV within the relevant GitHub Actions workflows to relying on the local Docker environment containers to have PCOV already pre-installed.

This is also being used to test WordPress/wpdev-docker-images#210, which adds PCOV to the containers.

Follow up to r62409.

Trac ticket: Core-644893.

Use of AI Tools

AI assistance: No


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@desrosj desrosj requested a review from johnbillion May 22, 2026 13:44
@desrosj desrosj self-assigned this May 22, 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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj.

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

Comment thread docker-compose.yml
##
php:
image: wordpressdevelop/php:${LOCAL_PHP-latest}
image: ghcr.io/wordpress/wpdev-docker-images/php:${LOCAL_PHP-latest}-210
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is temporary to test the upstream container PR and will not be included in the eventual commit.

Comment thread docker-compose.yml
##
cli:
image: wordpressdevelop/cli:${LOCAL_PHP-latest}
image: ghcr.io/wordpress/wpdev-docker-images/cli:${LOCAL_PHP-latest}-210
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is temporary to test the upstream container PR and will not be included in the eventual commit.

@github-actions
Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

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 updates the local Docker environment and CI workflow to rely on PCOV being preinstalled in the Docker images (instead of installing it during GitHub Actions runs), and wires a LOCAL_PHP_PCOV flag through the environment to control coverage-related behavior.

Changes:

  • Remove the GitHub Actions step that installs/enables PCOV via PECL, and instead pass a LOCAL_PHP_PCOV flag when coverage is requested.
  • Add PCOV tuning (pcov.initial.files) to the local PHP INI and inject pcov.directory when running PHPUnit with clover coverage.
  • Switch local-env Docker images to ghcr.io/wordpress/wpdev-docker-images/* with a -210 tag and expose LOCAL_PHP_PCOV to containers.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/local-env/scripts/docker.js Adds logic to inject pcov.directory into PHPUnit coverage runs (currently breaks the php ./vendor/bin/phpunit invocation pattern).
tools/local-env/php-config.ini Adds pcov.initial.files=10000 to tune PCOV performance.
docker-compose.yml Switches PHP/CLI images to ghcr.io/wordpress/wpdev-docker-images/* (tagged -210) and passes LOCAL_PHP_PCOV into containers.
.github/workflows/reusable-phpunit-tests-v3.yml Passes LOCAL_PHP_PCOV for coverage runs and removes the manual PCOV install step.
.env.example Documents the new LOCAL_PHP_PCOV environment variable.

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

Comment thread tools/local-env/scripts/docker.js
Comment thread tools/local-env/scripts/docker.js Outdated
Comment thread docker-compose.yml
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