Skip to content

Commit

Permalink
WP_Env: tests-cli phpunit executable file not found in $PATH: unknown (
Browse files Browse the repository at this point in the history
  • Loading branch information
jrtashjian authored Oct 13, 2023
1 parent 966e124 commit f07b815
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/env/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Bug Fix

- Corrected `PATH` to include the host user's Composer bin directory.
- Replaced `yoast/phpunit-polyfills` with `phpunit/phpunit` to install the required PHPUnit version, avoiding the need for project-specific polyfills.

## 8.9.0 (2023-10-05)

## 8.8.0 (2023-09-20)
Expand Down
4 changes: 2 additions & 2 deletions packages/env/lib/init-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ RUN rm /tmp/composer-setup.php`;
// Make sure to do this as the user and ensure the binaries are available in the $PATH.
dockerFileContent += `
USER $HOST_UID:$HOST_GID
ENV PATH="\${PATH}:~/.composer/vendor/bin"
RUN composer global require --dev yoast/phpunit-polyfills:"^1.0"
ENV PATH="\${PATH}:/home/$HOST_USERNAME/.composer/vendor/bin"
RUN composer global require --dev phpunit/phpunit:"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
USER root`;

return dockerFileContent;
Expand Down

1 comment on commit f07b815

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in f07b815.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6514014205
📝 Reported issues:

Please sign in to comment.