pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.07k stars 315 forks source link

[Bug]: Exception when using --filter=xyz... #1093

Closed Perf closed 4 months ago

Perf commented 4 months ago

What Happened

When executing pest with filter option, there is a specific exeption thrown and found in the logs:

Running vendor/bin/pest --filter=UserCollectionTest produces the log entry:

php.DEBUG: Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL {"exception":{"Symfony\Component\ErrorHandler\Exception\SilencedErrorContext":{"severity":2,"file":"/app/vendor/pestphp/pest/overrides/Runner/Filter/NameFilterIterator.php","line":104,"trace":[{"file":"/app/vendor/pestphp/pest/overrides/Runner/Filter/NameFilterIterator.php","line":70,"function":"setFilter","class":"PHPUnit\Runner\Filter\NameFilterIterator","type":"->"}],"count":1}}} []

How to Reproduce

Call pest with --filter option

Sample Repository

No response

Pest Version

2.33.6

PHP Version

8.3.2

Operation System

Linux

Notes

No response

nunomaduro commented 4 months ago

Please update to the latest Pest version. That was already fixed.

Perf commented 4 months ago

Hey @nunomaduro I am on a latest (2.33.6) version of Pest. Or you talking about dev-main?