Skip to content

Handle reserved keywords in test file names - #1804

Open
lazerg wants to merge 1 commit into
pestphp:4.xfrom
lazerg:fix/issue-1803-reserved-keyword-test-name
Open

Handle reserved keywords in test file names#1804
lazerg wants to merge 1 commit into
pestphp:4.xfrom
lazerg:fix/issue-1803-reserved-keyword-test-name

Conversation

@lazerg

@lazerg lazerg commented Jul 31, 2026

Copy link
Copy Markdown

What:

  • Bug Fix
  • New Feature

Description:

A test file whose name resolves to a PHP reserved keyword, such as list.test.php, made Pest generate final class list and abort the run with a ParseError. The class name now falls back to the existing InvalidTestName placeholder when it is not a valid identifier, so these files run like any other. The printable name still comes from the file path, so the reported output is unchanged.

Related:

Closes #1803

@lazerg
lazerg force-pushed the fix/issue-1803-reserved-keyword-test-name branch from eea7489 to d87afb8 Compare July 31, 2026 13:01
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.

1 participant