Skip to content

fix(core): work around Pest test file autoloading#1895

Merged
innocenzi merged 2 commits into3.xfrom
fix/discover-php-files
Feb 12, 2026
Merged

fix(core): work around Pest test file autoloading#1895
innocenzi merged 2 commits into3.xfrom
fix/discover-php-files

Conversation

@innocenzi
Copy link
Copy Markdown
Member

Closes #1894

During discovery, class_exists($className) will throw if $className points to a Pest test file. The exception is an assertion error in Pest's backtrace, I'm not sure why exactly it happens.

I figured catching the assertion error here would be good enough a work around, but it would be nice if you could take a proper look at it @brendt

@brendt brendt marked this pull request as ready for review February 12, 2026 12:08
@brendt brendt self-requested a review as a code owner February 12, 2026 12:08
Copy link
Copy Markdown
Member

@brendt brendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird error, but this seems like a good workaround. I'm fine merging this

@innocenzi innocenzi merged commit 63c6353 into 3.x Feb 12, 2026
81 checks passed
@innocenzi innocenzi deleted the fix/discover-php-files branch February 12, 2026 13:46
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.

Pest integration does not work

2 participants