pestphp / pestphp/pest

[Bug]: Strict phpunit requirement in composer.json prevents security patches

Open Beginner friendly
#1,679 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

What Happened

I wanted to fix the latest security issue in phpunit by updating that package, but Pest prevents this. That was somewhat fixed in v4.6.3 now, but a future security issue in phpunit is prevented again. The composer.json requires ^12.5.23 (thus 12.5.23 or anything higher in 12.*), but also conflicts >12.5.23, as in everything higher than 12.5.23. Effectively locking phpunit to exactly 12.5.23.

I don't think this should be locked in that very specific way. I don't know why this was done, maybe it is actually a typo, and meant to be conflicts <12.5.23, although also that is quite strict. Maybe it was meant to state that Pest is tested and thus supported on this specific version? But I think at least patch upgrades from phpunit should be allowed. If phpunit would release a patch which breaks Pest that would be a bug at phpunit or Pest, but I think that's better than prevent users from fixing security issues.

How to Reproduce
  • Install Pest
  • Wait for a new phpunit version
  • Run composer update phpunit/phpunit
Sample Repository

No response

Pest Version

v4.3.2

PHP Version

8.5.3

Operation System

Linux

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The dependency constraints are in composer.json; start by reproducing the issue with composer update phpunit/phpunit and inspect the phpunit/phpunit require and conflict entries. Determine the compatible constraint, then verify that supported patch updates are no longer blocked and Pest still installs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.