Skip to content

fix: support brianium/paratest 7.26.1 worker tmp dir - #1959

Merged
MrPunyapal merged 1 commit into
pestphp:5.xfrom
ExeQue:fix/paratest-7.26.1-tmp-dir
Oct 11, 2026
Merged

MrPunyapal merged 1 commit into
pestphp:5.xfrom
ExeQue:fix/paratest-7.26.1-tmp-dir

Conversation

@ExeQue

@ExeQue ExeQue commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

brianium/paratest v7.26.1 (paratestphp/paratest#1148) added a required string $tmpDir argument to WrapperWorker::__construct(), so every --parallel run fails with ArgumentCountError.

This ports the same change to Pest's WrapperRunner:

  • Create a private 0700 directory per run ({tmpDir}/pest_<random hex>) and pass it to each WrapperWorker.
  • mkdir is intentionally not followed by an is_dir() fallback: a pre-existing path may have been planted by another user, and the main process deserializes/includes worker files from it.
  • Remove the directory in complete() after the worker files are cleared.
  • Require brianium/paratest: ^7.26.1.

Only 5.x is affected: paratest 7.26.1 requires phpunit/phpunit ^13.4.1, which 3.x and 4.x cannot resolve.

Note: Tests\Features\Tia > it does not run user hooks when replaying cached skipped and incomplete results fails intermittently under composer test:parallel on a clean 5.x with paratest 7.26.0 as well; it is unrelated to this change.

Related:

Fixes #1958

paratest 7.26.1 added a required $tmpDir argument to WrapperWorker and
keeps worker files in a private per-run directory. Create that 0700
directory per run, pass it to each worker and remove it on completion.
Require paratest ^7.26.1.
@ExeQue

ExeQue commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

@nunomaduro @MrPunyapal could one of you approve the CI workflows for this PR? Since brianium/paratest v7.26.1, every Pest 5 project that installs without a composer.lock (e.g. most package CI matrices) fails on --parallel with ArgumentCountError. A patch release once this is merged would unblock them.

@ExeQue

ExeQue commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

The Tests failure is unrelated to this change: PHP 8.5 - Symfony ^8.0 - macos-latest fails in the Setup PHP step (✗ PHP Could not setup PHP 8.5 from shivammathur/setup-php) before Pest is installed (job). The scheduled 5.x runs have failed in the same job and step since 2026-10-08 (latest).

PHP 8.5 - ubuntu-latest passes, including test:parallel and test:integration. The PHP 8.4 jobs were cancelled by fail-fast. Could you re-run the failed and cancelled jobs once the macOS runner is fixed?

@ExeQue

ExeQue commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@MrPunyapal heads-up: the macos-latest runner is currently broken for PHP 8.5. shivammathur/setup-php fails with ✗ PHP Could not setup PHP 8.5 in the Setup PHP step, before Pest is installed. The scheduled 5.x runs have failed the same way since 2026-10-08, so every PR's Tests workflow fails and fail-fast cancels the remaining jobs.

Could you re-run the failed and cancelled jobs on this PR once the runner is fixed? PHP 8.5 - ubuntu-latest already passes.

@nunomaduro

Copy link
Copy Markdown
Member

thank you! can you check the failing tests?

@ExeQue

ExeQue commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

@nunomaduro no test fails: the only failing job is PHP 8.5 - Symfony ^8.0 - macos-latest, and it fails in the Setup PHP step before Pest is installed. The macos-latest runner cannot set up PHP 8.5 (✗ PHP Could not setup PHP 8.5 from shivammathur/setup-php); the scheduled 5.x runs have failed the same way since 2026-10-08.

PHP 8.5 - ubuntu-latest passes, including test:parallel and test:integration. The PHP 8.4 jobs never ran: fail-fast cancels them when the macOS job fails. Locally, the full composer test passes.

@MrPunyapal
MrPunyapal merged commit 5f3d0f2 into pestphp:5.x Oct 11, 2026
4 of 13 checks passed
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.

[Bug]: --parallel fails with brianium/paratest 7.26.1 (WrapperWorker::__construct() now requires $tmpDir)

3 participants