Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
f720be8
Add reference method
mertasan Sep 11, 2024
bab193e
Fix property type
mertasan Sep 12, 2024
6686854
Fix phpdoc type-hints
mertasan Sep 12, 2024
169b764
make the name of the method plural
mertasan Sep 12, 2024
ab0b4a1
Update src/PendingCalls/TestCall.php
mertasan Sep 12, 2024
74ff3b8
Update src/PendingCalls/TestCall.php
mertasan Sep 12, 2024
ba7eb70
Remove unnecessary property
mertasan Sep 12, 2024
e3bfcbe
Add slugify method
tmhamed Sep 16, 2024
92bc1de
Add tests for toBeSlug method
tmhamed Sep 16, 2024
dd7d150
Add toNotIncludeSuspiciousCharacters() expectation
mortenscheel Oct 4, 2024
53c9460
fix: handle -c flag same as --configuration
FaSe22 Oct 16, 2024
5331b44
Allow custom arch expectations
olivernybroe Nov 20, 2024
b5b8fab
Fix an issue where beforeEach/afterEach functions were called on othe…
jshayes Oct 12, 2024
50ff347
Pass description into describe call
jshayes Nov 11, 2024
1ad30a9
toMatchArray/Object wrong field fix
drsdre Feb 25, 2025
0bdaef2
Fix lingering }
drsdre Feb 25, 2025
2c3a53f
Remove reset of message
drsdre Feb 25, 2025
174645c
throw exception instead of using Panic
soyuka Mar 18, 2025
490f321
fix: normalize snapshot paths for files outside tests directory
clementbirkle Mar 19, 2025
e46d499
add tests for snapshots external to the tests directory
clementbirkle Mar 19, 2025
19e9267
fix: update PHPUnit version
MrPunyapal Apr 20, 2025
442a58d
refactor: comment arch presets in Arch.php
MrPunyapal Apr 20, 2025
4f6140f
refactor: move test case initialization to a separate method in Testa…
MrPunyapal Apr 20, 2025
d1608bf
chore: prepares for 4.x
nunomaduro Apr 20, 2025
efdc84e
Merge branch '4.x' into feat/phpunit-12
nunomaduro Apr 20, 2025
bf67407
Merge pull request #1391 from MrPunyapal/feat/phpunit-12
nunomaduro Apr 20, 2025
8cfb0ac
bump paratest
nunomaduro Apr 20, 2025
791734a
Fixes tests
nunomaduro Apr 20, 2025
635e3b4
chore: deprecates php 8.2
nunomaduro Apr 20, 2025
db9243c
bump dependencies
nunomaduro Apr 29, 2025
a310796
Fixes filtering tests
nunomaduro Apr 29, 2025
99c9f4e
Bumps dependencies
nunomaduro May 3, 2025
7711a52
Bumps dependencies
nunomaduro May 9, 2025
909d778
fix: undefined property
nunomaduro May 21, 2025
c62cc3f
chore: adds pokio
nunomaduro May 23, 2025
02b1ffb
chore: bump dependencies
nunomaduro May 27, 2025
0fc9d4d
feat: adds phpunit `12.2.1` support
nunomaduro Jun 8, 2025
5d2aafd
feat: --profanity
nunomaduro Jun 11, 2025
dd44ac4
remove language option from profanity composer script
JonPurvis Jun 14, 2025
49bf000
fix: coverage when coverage file is over `2.4gb` on mac os
nunomaduro Jun 15, 2025
8c403a5
fix: upper case fix
nunomaduro Jun 16, 2025
c3bfdf1
chore: type checking
nunomaduro Jun 16, 2025
163479a
chore: style
nunomaduro Jun 16, 2025
ef76c04
feat: adds `fixture`
nunomaduro Jun 27, 2025
7fc6903
chore: adjusts style
nunomaduro Jun 27, 2025
a22013a
fix: `with` types
nunomaduro Jun 28, 2025
0bc3219
feat: moves `visit` to the core
nunomaduro Jun 28, 2025
3faeede
chore: fixes snapshots
nunomaduro Jun 28, 2025
af3fdce
feat: adds phpunit `12.2.5` support
nunomaduro Jun 28, 2025
3f27352
feat: adds `--shard`
nunomaduro Jun 30, 2025
2ff4713
ci: fix missing dep
nunomaduro Jun 30, 2025
d8e1b27
ci: fix included version
nunomaduro Jun 30, 2025
5def620
fix: shard regex
nunomaduro Jul 1, 2025
73bf579
chore: code refactor
nunomaduro Jul 1, 2025
0f1e87c
Adds output about sharding
nunomaduro Jul 5, 2025
0d148c2
chroe: bumps phpunit
nunomaduro Jul 5, 2025
9d0410e
feat: adjusts only for browser debug
nunomaduro Jul 6, 2025
0355119
fix: snapshots feedback
nunomaduro Jul 6, 2025
84636ce
Merge branch '4.x' into remove-language-option
nunomaduro Jul 14, 2025
8f810bf
Merge pull request #1408 from JonPurvis/remove-language-option
nunomaduro Jul 14, 2025
e0695a1
feat: adds shell
nunomaduro Jul 21, 2025
fb282b1
fix: return type
nunomaduro Jul 21, 2025
00572f5
feat: improves playwright
nunomaduro Jul 22, 2025
f981479
feat: `skipOnCI`
nunomaduro Jul 22, 2025
516ace8
fix: skipOnCI
nunomaduro Jul 22, 2025
f49b91e
fixes missing condition
nunomaduro Jul 22, 2025
924dc01
feat: `skipLocally`
nunomaduro Jul 22, 2025
9172721
Merge pull request #1241 from mertasan/ide-reference
nunomaduro Jul 22, 2025
be9c95e
feat: adds `see`
nunomaduro Jul 22, 2025
e513f76
Merge pull request #1256 from mazesec/add-slugify-method
nunomaduro Jul 22, 2025
21e22de
Merge pull request #1299 from FaSe22/handle-c-flag
nunomaduro Jul 22, 2025
f990124
updates dependencies and snapshots
nunomaduro Jul 22, 2025
fe27012
style
nunomaduro Jul 22, 2025
aac0862
ci: removes testing against lowest
nunomaduro Jul 23, 2025
6d6e4e0
fix: wrong status code being used
nunomaduro Jul 26, 2025
de4409e
fix: before all
nunomaduro Jul 26, 2025
520a5fe
Merge branch '4.x' into 3.x
nunomaduro Jul 26, 2025
3d9ceb1
Merge pull request #1373 from clementbirkle/3.x
nunomaduro Jul 26, 2025
1d8d1a0
Merge pull request #1357 from drsdre/patch-1
nunomaduro Jul 26, 2025
2aa3256
fix: adjust snapshots
nunomaduro Jul 26, 2025
222ed17
style
nunomaduro Jul 26, 2025
e293023
Merge branch '3.x' into 4.x
nunomaduro Jul 26, 2025
7a6f33f
Merge branch '3.x' into 4.x
nunomaduro Jul 26, 2025
ee70a3c
Merge pull request #1319 from pestphp/allow-custom-arch-expectations
nunomaduro Jul 26, 2025
d6c6489
Merge branch '4.x' into fix/sibling-describe-blocks
nunomaduro Jul 26, 2025
3e86e15
Merge pull request #1304 from jshayes/fix/sibling-describe-blocks
nunomaduro Jul 26, 2025
d187566
chore: updates snapshots
nunomaduro Jul 26, 2025
da04ba6
Merge pull request #1287 from mortenscheel/patch-1
nunomaduro Jul 26, 2025
66e59ef
Merge branch '3.x' into 4.x
nunomaduro Jul 26, 2025
4c88590
feat: `not.toHaveSuspiciousCharacters`
nunomaduro Jul 26, 2025
ee6b3ed
fix: throw a fatal exception if the tests directory does not exist
joelbutcher Jul 29, 2025
fbc9e70
Merge pull request #1424 from joelbutcher/fix/throw-if-tests-director…
nunomaduro Jul 30, 2025
27414ce
Merge pull request #1372 from soyuka/patch-1
nunomaduro Jul 30, 2025
e524bf5
fix: filter by dataset name
nunomaduro Jul 30, 2025
91bb758
fix: wording on exception
nunomaduro Aug 3, 2025
fcb60f3
chore: improves wording
nunomaduro Aug 3, 2025
273edb8
chore: adjusts tests
nunomaduro Aug 3, 2025
3b72bbd
fix: `toMatchObject` accept objects
nunomaduro Aug 3, 2025
e7132fa
fix: removes `parse_str` from security preset
nunomaduro Aug 3, 2025
711a60c
release: beta 1
nunomaduro Aug 5, 2025
0b96b8f
Allows old version of phpunit for now
nunomaduro Aug 6, 2025
e3e5187
release: beta 2
nunomaduro Aug 11, 2025
1ee36f5
Merge branch '3.x' into 4.x
nunomaduro Aug 15, 2025
39b66bf
Merge branch '3.x' into 4.x
nunomaduro Aug 20, 2025
ed38fb6
release: 4.0.0 rc 1
nunomaduro Aug 20, 2025
92523a6
chore: uses phpunit `v12.3.5`
nunomaduro Aug 20, 2025
98a1201
Merge branch '3.x' into 4.x
nunomaduro Aug 20, 2025
71c2e97
chore: bumps dependencies
nunomaduro Aug 20, 2025
a350545
fix: windows check
nunomaduro Aug 20, 2025
6b523d6
fix: puts back windows
nunomaduro Aug 20, 2025
19eca6e
fix: skip windows for now
nunomaduro Aug 20, 2025
8722b3f
docs: adjusts readme for 4.x
nunomaduro Aug 20, 2025
507df75
release: 4.0.0
nunomaduro Aug 20, 2025
50960a9
docs: adjusts release script
nunomaduro Aug 20, 2025
a7b2039
Merge branch '3.x' into 4.x
nunomaduro Aug 20, 2025
cd5272d
Cast "testdox-columns" to an int
Admiral-Enigma Aug 22, 2025
7f9b509
Merge pull request #1460 from Admiral-Enigma/4.x
nunomaduro Aug 22, 2025
af1e214
chore: bumps dependencies
nunomaduro Aug 22, 2025
d5ced0a
release: 4.0.1
nunomaduro Aug 22, 2025
3d776f1
fix: revert reading coverage by chunks
nunomaduro Aug 22, 2025
7f11ace
release: 4.0.2
nunomaduro Aug 22, 2025
3381701
Prevent duplicate attributes
gehrisandro Aug 23, 2025
f11f3aa
Merge pull request #1464 from gehrisandro/sandro/prevent-duplicate-at…
nunomaduro Aug 23, 2025
7749775
chore: uses phpunit 12.3.6
nunomaduro Aug 24, 2025
e54e4a0
release: 4.0.3
nunomaduro Aug 24, 2025
639df4c
chore: uses phpunit 12.3.7
nunomaduro Aug 28, 2025
47fb1d7
release: v4.0.4
nunomaduro Aug 28, 2025
843dbbf
Update README.md
nunomaduro Aug 31, 2025
f91c6c1
Update social media links in Thanks.php
nunomaduro Aug 31, 2025
65cabf9
chore: bumps dependencies
nunomaduro Sep 10, 2025
314caab
chore: improves types
nunomaduro Sep 10, 2025
b740693
release: v4.1.0
nunomaduro Sep 10, 2025
fc7a418
adjusts sponsors
nunomaduro Sep 18, 2025
8e3444e
chore: bumps requirements
nunomaduro Oct 1, 2025
b0fab7e
chore: uses `phpunit@12.4`
nunomaduro Oct 5, 2025
08b09f2
release: 4.1.2
nunomaduro Oct 5, 2025
4105e33
Fix Undefined array key "testdox-columns" warning
Se7en-RU Oct 21, 2025
b7b1609
Specify closure this for extend
pindab0ter Oct 29, 2025
477d20a
release: 4.1.3
nunomaduro Oct 29, 2025
00990ef
Merge pull request #1544 from Se7en-RU/fix-testdox-columns-warning
nunomaduro Nov 4, 2025
1a39826
ci: tests against php 8.5
nunomaduro Nov 20, 2025
5134043
ci: bump actions/checkout 4 => 5
Chris8934 Nov 22, 2025
41fd831
release: 4.1.4
nunomaduro Nov 24, 2025
f5820bd
release: 4.1.5
nunomaduro Nov 24, 2025
27aa305
Merge pull request #1576 from Chris53897/feature/ci
nunomaduro Nov 25, 2025
ae419af
chore: support for symfony 8.0.0 components
nunomaduro Nov 28, 2025
b4172e2
bump checkout version from 5 to 6
jackbayliss Dec 10, 2025
b1c997a
feat: show more useful exception when `intl` extension not found
owenvoke Dec 12, 2025
6a96aed
feat: adds `phpunit@12.5` support
nunomaduro Dec 15, 2025
7c43c1c
Merge pull request #1586 from jackbayliss/bump-checkout-action
nunomaduro Dec 15, 2025
62694c1
chore: style
nunomaduro Dec 15, 2025
44e315d
feat: add --dirty documentation in --help
bilboque Dec 22, 2025
064ab3f
Merge pull request #1595 from bilboque/dirty-flag-not-found-in-help
nunomaduro Dec 30, 2025
1701a30
Merge pull request #1590 from pestphp/feature/intl-exception
nunomaduro Dec 30, 2025
be90610
feat: add pest only function to mark each test in a file as only
Willem-Jaap Dec 30, 2025
c157b66
style: format
Willem-Jaap Dec 30, 2025
58b8f3c
Merge pull request #1598 from Willem-Jaap/willem-jaap/pest-only-file-…
nunomaduro Dec 30, 2025
e86bec3
release: 4.3.0
nunomaduro Dec 30, 2025
9fe61e0
docs: update sponsors
nunomaduro Jan 3, 2026
3a566b1
docs: why php
nunomaduro Jan 4, 2026
bc39830
chore: removes `toHaveSuspiciousCharacters` from php preset
nunomaduro Jan 4, 2026
bc57a84
release: 4.3.1
nunomaduro Jan 4, 2026
df3205e
Merge pull request #1554 from pindab0ter/feature/extend-closure-this
nunomaduro Jan 13, 2026
c7e4efc
fix: replace `substr` with `mb_substr` in Str::beforeLast to ensure m…
smirok Jan 13, 2026
dd01229
Merge pull request #1606 from smirok/teamcity-fix-for-describe-tests-…
nunomaduro Jan 15, 2026
3a4329d
release: 4.3.2
nunomaduro Jan 28, 2026
6014747
fix: handle AfterLastTestMethodErrored in StateGenerator for parallel…
QDenka Feb 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
tools: composer:v2
coverage: none
extensions: sockets

- name: Install Dependencies
run: composer update --prefer-stable --no-interaction --no-progress --ansi

# - name: Type Check
# run: composer test:type:check
- name: Profanity Check
run: composer test:profanity

- name: Type Check
run: composer test:type:check

- name: Type Coverage
run: composer test:type:coverage
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
symfony: ['7.1']
php: ['8.2', '8.3', '8.4']
dependency_version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest, macos-latest] # windows-latest
symfony: ['7.3']
php: ['8.3', '8.4', '8.5']
dependency_version: [prefer-stable]

name: PHP ${{ matrix.php }} - Symfony ^${{ matrix.symfony }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
extensions: sockets

- name: Setup Problem Matches
run: |
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<p align="center">
<img src="https://raw.githubusercontent.com/pestphp/art/master/v3/banner.png" width="600" alt="PEST">
<img src="https://raw.githubusercontent.com/pestphp/art/master/v4/social.png" width="600" alt="PEST">
<p align="center">
<a href="https://github.com/pestphp/pest/actions"><img alt="GitHub Workflow Status (master)" src="https://img.shields.io/github/actions/workflow/status/pestphp/pest/tests.yml?branch=3.x&label=Tests%203.x"></a>
<a href="https://github.com/pestphp/pest/actions"><img alt="GitHub Workflow Status (master)" src="https://img.shields.io/github/actions/workflow/status/pestphp/pest/tests.yml?branch=4.x&label=Tests%204.x"></a>
<a href="https://packagist.org/packages/pestphp/pest"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/pestphp/pest"></a>
<a href="https://packagist.org/packages/pestphp/pest"><img alt="Latest Version" src="https://img.shields.io/packagist/v/pestphp/pest"></a>
<a href="https://packagist.org/packages/pestphp/pest"><img alt="License" src="https://img.shields.io/packagist/l/pestphp/pest"></a>
<a href="https://whyphp.dev"><img src="https://img.shields.io/badge/Why_PHP-in_2026-7A86E8?style=flat-square&labelColor=18181b" alt="Why PHP in 2026"></a>
</p>
</p>

------

> Pest v3 Now Available: **[Read the announcement »](https://pestphp.com/docs/pest3-now-available)**.
> Pest v4 Now Available: **[Read the announcement »](https://pestphp.com/docs/pest-v4-is-here-now-with-browser-testing)**.

**Pest** is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.

- Explore our docs at **[pestphp.com »](https://pestphp.com)**
- Follow the creator Nuno Maduro:
- YouTube: **[youtube.com/@nunomaduro](https://www.youtube.com/@nunomaduro)** — Videos every weekday
- Twitch: **[twitch.tv/enunomaduro](https://www.twitch.tv/enunomaduro)** — Streams (almost) every weekday
- YouTube: **[youtube.com/@nunomaduro](https://youtube.com/@nunomaduro)** — Videos every week
- Twitch: **[twitch.tv/nunomaduro](https://twitch.tv/nunomaduro)** — Live coding on Mondays, Wednesdays, and Fridays at 9PM UTC
- Twitter / X: **[x.com/enunomaduro](https://x.com/enunomaduro)**
- LinkedIn: **[linkedin.com/in/nunomaduro](https://www.linkedin.com/in/nunomaduro)**
- Instagram: **[instagram.com/enunomaduro](https://www.instagram.com/enunomaduro)**
Expand All @@ -30,23 +31,23 @@ We cannot thank our sponsors enough for their incredible support in funding Pest

### Platinum Sponsors

- **[Laracasts](https://laracasts.com/?ref=pestphp)**
- **[CodeRabbit](https://coderabbit.ai/?ref=pestphp)**
- **[Devin](https://devin.ai/?ref=nunomaduro)**
- **[Mailtrap](https://l.rw.rw/pestphp)**
- **[Tighten](https://tighten.com/?ref=nunomaduro)**
- **[Redberry](https://redberry.international/laravel-development/?utm_source=pest&utm_medium=banner&utm_campaign=pest_sponsorship)**

### Gold Sponsors

- **[CodeRabbit](https://coderabbit.ai/?ref=pestphp)**
- **[NativePHP](https://nativephp.com/mobile?ref=pestphp.com)**
- **[CMS Max](https://cmsmax.com/?ref=pestphp)**

### Premium Sponsors

- [Zapiet](https://zapiet.com/?ref=pestphp)
- [Load Forge](https://loadforge.com/?ref=pestphp)
- [Route4Me](https://route4me.com/pt?ref=pestphp)
- [Nerdify](https://getnerdify.com/?ref=pestphp)
- [Akaunting](https://akaunting.com/?ref=pestphp)
- [DocuWriter.ai](https://www.docuwriter.ai/?ref=pestphp)
- [Localazy](https://localazy.com/?ref=pestphp)
- [Forge](https://forge.laravel.com/?ref=pestphp)
- [Route4Me](https://www.route4me.com/?ref=pestphp)
- [Spatie](https://spatie.be/?ref=pestphp)
- [Worksome](https://www.worksome.com/?ref=pestphp)
- [Zapiet](https://www.zapiet.com/?ref=pestphp)
- [LambdaTest](https://lambdatest.com/?ref=pestphp)

Pest is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
6 changes: 3 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

When releasing a new version of Pest there are some checks and updates that need to be done:

> **For Pest v2 you should use the `2.x` branch instead.**
> **For Pest v3 you should use the `3.x` branch instead.**

- Clear your local repository with: `git add . && git reset --hard && git checkout 3.x`
- On the GitHub repository, check the contents of [github.com/pestphp/pest/compare/{latest_version}...3.x](https://github.com/pestphp/pest/compare/{latest_version}...3.x)
- Clear your local repository with: `git add . && git reset --hard && git checkout 4.x`
- On the GitHub repository, check the contents of [github.com/pestphp/pest/compare/{latest_version}...4.x](https://github.com/pestphp/pest/compare/{latest_version}...4.x)
- Update the version number in [src/Pest.php](src/Pest.php)
- Run the tests locally using: `composer test`
- Commit the Pest file with the message: `git commit -m "release: vX.X.X"`
Expand Down
2 changes: 1 addition & 1 deletion bin/worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
$getopt['teamcity-file'] ?? null,
$getopt['testdox-file'] ?? null,
isset($getopt['testdox-color']),
$getopt['testdox-columns'] ?? null,
(int) ($getopt['testdox-columns'] ?? null),
);

while (true) {
Expand Down
47 changes: 26 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@
}
],
"require": {
"php": "^8.2.0",
"brianium/paratest": "^7.8.4",
"nunomaduro/collision": "^8.8.2",
"nunomaduro/termwind": "^2.3.1",
"pestphp/pest-plugin": "^3.0.0",
"pestphp/pest-plugin-arch": "^3.1.1",
"pestphp/pest-plugin-mutate": "^3.0.5",
"phpunit/phpunit": "^11.5.33"
"php": "^8.3.0",
"brianium/paratest": "^7.16.1",
"nunomaduro/collision": "^8.8.3",
"nunomaduro/termwind": "^2.3.3",
"pestphp/pest-plugin": "^4.0.0",
"pestphp/pest-plugin-arch": "^4.0.0",
"pestphp/pest-plugin-mutate": "^4.0.1",
"pestphp/pest-plugin-profanity": "^4.2.1",
"phpunit/phpunit": "^12.5.8",
"symfony/process": "^7.4.4|^8.0.0"
},
"conflict": {
"filp/whoops": "<2.16.0",
"phpunit/phpunit": ">11.5.33",
"sebastian/exporter": "<6.0.0",
"filp/whoops": "<2.18.3",
"phpunit/phpunit": ">12.5.8",
"sebastian/exporter": "<7.0.0",
"webmozart/assert": "<1.11.0"
},
"autoload": {
Expand All @@ -53,9 +55,10 @@
]
},
"require-dev": {
"pestphp/pest-dev-tools": "^3.4.0",
"pestphp/pest-plugin-type-coverage": "^3.6.1",
"symfony/process": "^7.3.0"
"pestphp/pest-dev-tools": "^4.0.0",
"pestphp/pest-plugin-browser": "^4.2.1",
"pestphp/pest-plugin-type-coverage": "^4.0.3",
"psy/psysh": "^0.12.18"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -71,16 +74,17 @@
],
"scripts": {
"refacto": "rector",
"lint": "pint",
"lint": "pint --parallel",
"test:refacto": "rector --dry-run",
"test:lint": "pint --test",
"test:lint": "pint --parallel --test",
"test:profanity": "php bin/pest --profanity --compact",
"test:type:check": "phpstan analyse --ansi --memory-limit=-1 --debug",
"test:type:coverage": "php -d memory_limit=-1 bin/pest --type-coverage --min=100",
"test:unit": "php bin/pest --colors=always --exclude-group=integration --compact",
"test:inline": "php bin/pest --colors=always --configuration=phpunit.inline.xml",
"test:parallel": "php bin/pest --colors=always --exclude-group=integration --parallel --processes=3",
"test:integration": "php bin/pest --colors=always --group=integration -v",
"update:snapshots": "REBUILD_SNAPSHOTS=true php bin/pest --colors=always --update-snapshots",
"test:unit": "php bin/pest --exclude-group=integration --compact",
"test:inline": "php bin/pest --configuration=phpunit.inline.xml",
"test:parallel": "php bin/pest --exclude-group=integration --parallel --processes=3",
"test:integration": "php bin/pest --group=integration -v",
"update:snapshots": "REBUILD_SNAPSHOTS=true php bin/pest --update-snapshots",
"test": [
"@test:refacto",
"@test:lint",
Expand Down Expand Up @@ -111,6 +115,7 @@
"Pest\\Plugins\\Snapshot",
"Pest\\Plugins\\Verbose",
"Pest\\Plugins\\Version",
"Pest\\Plugins\\Shard",
"Pest\\Plugins\\Parallel"
]
},
Expand Down
4 changes: 3 additions & 1 deletion overrides/Event/Value/ThrowableBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
use PHPUnit\Util\ThrowableToStringMapper;

/**
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
*
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final readonly class ThrowableBuilder
Expand Down Expand Up @@ -82,7 +84,7 @@ public static function from(\Throwable $t): Throwable
$t->getMessage(),
ThrowableToStringMapper::map($t),
$trace,
$previous
$previous,
);
}
}
4 changes: 3 additions & 1 deletion overrides/Runner/Filter/NameFilterIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ public function accept(): bool
}

if ($test instanceof HasPrintableTestCaseName) {
$name = $test::getPrintableTestCaseName().'::'.$test->getPrintableTestCaseMethodName();
$name = trim(
$test::getPrintableTestCaseName().'::'.$test->getPrintableTestCaseMethodName().$test->dataSetAsString()
);
} else {
$name = $test::class.'::'.$test->nameWithDataSet();
}
Expand Down
5 changes: 1 addition & 4 deletions overrides/Runner/ResultCache/DefaultResultCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@
*/
final class DefaultResultCache implements ResultCache
{
/**
* @var string
*/
private const DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache';
private const string DEFAULT_RESULT_CACHE_FILENAME = '.phpunit.result.cache';

private readonly string $cacheFilename;

Expand Down
9 changes: 9 additions & 0 deletions overrides/TextUI/TestSuiteFilterProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
namespace PHPUnit\TextUI;

use Pest\Plugins\Only;
use Pest\Runner\Filter\EnsureTestCaseIsInitiatedFilter;
use PHPUnit\Event;
use PHPUnit\Framework\TestSuite;
use PHPUnit\Runner\Filter\Factory;
Expand All @@ -66,13 +67,21 @@ public function process(Configuration $configuration, TestSuite $suite): void
{
$factory = new Factory;

// @phpstan-ignore-next-line
(fn () => $this->filters[] = [
'className' => EnsureTestCaseIsInitiatedFilter::class,
'argument' => '',
])->call($factory);

if (! $configuration->hasFilter() &&
! $configuration->hasGroups() &&
! $configuration->hasExcludeGroups() &&
! $configuration->hasExcludeFilter() &&
! $configuration->hasTestsCovering() &&
! $configuration->hasTestsUsing() &&
! Only::isEnabled()) {
$suite->injectFilter($factory);

return;
}

Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<testsuites>
<testsuite name="default">
<directory suffix=".php">./tests</directory>
<directory suffix=".php">./tests-external</directory>
<exclude>./tests/.snapshots</exclude>
<exclude>./tests/.tests</exclude>
<exclude>./tests/Fixtures/Inheritance</exclude>
Expand Down
6 changes: 6 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

declare(strict_types=1);

use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector;
use Rector\TypeDeclaration\Rector\ClassMethod\NarrowObjectReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;

return RectorConfig::configure()
Expand All @@ -12,6 +15,9 @@
->withSkip([
__DIR__.'/src/Plugins/Parallel/Paratest/WrapperRunner.php',
ReturnNeverTypeRector::class,
ArrowFunctionDelegatingCallToFirstClassCallableRector::class,
NarrowObjectReturnTypeRector::class,
RemoveParentDelegatingConstructorRector::class,
])
->withPreparedSets(
deadCode: true,
Expand Down
22 changes: 22 additions & 0 deletions resources/views/installers/plugin-browser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div class="mx-2 mb-1">
<p>
<span>Using the <span class="text-yellow font-bold">visit()</span> function requires the Pest Plugin Browser to be installed.</span>

<span class="ml-1 text-yellow font-bold">Run:</span>
</p>

<div>
<span class="text-gray mr-1">- </span>
<span>composer require pestphp/pest-plugin-browser:^4.0 --dev</span>
</div>

<div>
<span class="text-gray mr-1">- </span>
<span>npm install playwright@latest</span>
</div>

<div>
<span class="text-gray mr-1">- </span>
<span>npx playwright install</span>
</div>
</div>
1 change: 0 additions & 1 deletion src/ArchPresets/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function execute(): void
'create_function',
'unserialize',
'extract',
'parse_str',
'mb_parse_str',
'dl',
'assert',
Expand Down
2 changes: 1 addition & 1 deletion src/Bootstrappers/BootExcludeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class BootExcludeList implements Bootstrapper
*
* @var array<int, non-empty-string>
*/
private const EXCLUDE_LIST = [
private const array EXCLUDE_LIST = [
'bin',
'overrides',
'resources',
Expand Down
Loading