Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: stat(): stat failed for vendor/pestphp/pest/src/Plugins/../../.temp/only.lock #1079

Closed
eleftrik opened this issue Jan 28, 2024 · 4 comments
Labels

Comments

@eleftrik
Copy link

What Happened

Laravel Zero, I got this error when running my test suite (or even some single test file):

  Tests:    89 passed (249 assertions)
  Duration: 3.94s
  Parallel: 4 processes


   Pest\Exceptions\FatalException

  stat(): stat failed for /Users/erik/Sviluppo/www/encodia/edit-cli/vendor/pestphp/pest/src/Plugins/../../.temp/only.lock

  at vendor/dg/bypass-finals/src/NativeWrapper.php:206
    202▕ 	private function native(string $func)
    203▕ 	{
    204▕ 		stream_wrapper_restore(self::PROTOCOL);
    205▕ 		try {
  ➜ 206▕ 			return $func(...array_slice(func_get_args(), 1));
    207▕ 		} finally {
    208▕ 			stream_wrapper_unregister(self::PROTOCOL);
    209▕ 			stream_wrapper_register(self::PROTOCOL, self::$outerWrapper);
    210▕ 		}

Script XDEBUG_MODE=off ./vendor/bin/pest --parallel --bail --exclude-group=API,S3 --colors=always handling the test event returned with error code 1

I'm requiring nunomaduro/mock-final-classes which, as I can see, it requires dg/bypass-finals (where the error is happening):

❯ composer why dg/bypass-finals
nunomaduro/mock-final-classes v1.2.0 requires dg/bypass-finals (^1.1)

Any hints?

Thank you so much.

How to Reproduce

Run two or more tests (running a single test doesn't seem to produce this error)

Sample Repository

No response

Pest Version

2.33.0

PHP Version

8.2.15

Operation System

macOS

Notes

No response

@eleftrik eleftrik added the bug label Jan 28, 2024
@eleftrik
Copy link
Author

eleftrik commented Jan 28, 2024

I can confirm that if I downgrade Pest to version 2.32.0, this error disappears.

@eleftrik
Copy link
Author

eleftrik commented Jan 28, 2024

The error also disappears if I remove nunomaduro/mock-final-classes and I remove final from tested classes.

@nunomaduro
Copy link
Member

Fixed on Pest v2.33.2.

@eleftrik
Copy link
Author

Thank you very much, @nunomaduro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants