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

PHPUnit 10-dev: previous version cache raises "Argument 2 passed to PHPUnit\Runner\DefaultTestResultCache::setStatus() must be an instance of PHPUnit\Framework\TestStatus\TestStatus, int given, called in ./vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php on line 174" #4580

Closed
Slamdunk opened this issue Jan 14, 2021 · 2 comments · Fixed by #4614
Assignees
Labels
type/bug Something is broken
Milestone

Comments

@Slamdunk
Copy link
Contributor

Q A
PHPUnit version 10.0.x-dev
PHP version 7.4.14
Installation Method Composer

Summary

After upgrading to PHPUnit 10-dev with a PHPUnit 9 cache present in .phpunit.result.cache, the run fails immediately

Current behavior

$ vendor/bin/phpunit
Argument 2 passed to PHPUnit\Runner\DefaultTestResultCache::setStatus() must be an instance
of PHPUnit\Framework\TestStatus\TestStatus, int given, called in
./vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php on line 174

Expected behavior

I suggest to either:

  1. Check the cache version before using it, and dismiss it if not matching with current runtime
  2. Pinpoint to clear the cache in the ChangeLog-10.0.md
@Slamdunk Slamdunk added the type/bug Something is broken label Jan 14, 2021
@sebastianbergmann sebastianbergmann added this to the PHPUnit 10.0 milestone Jan 14, 2021
@Slamdunk
Copy link
Contributor Author

Note: we should also check that php-code-coverage cache version upgrade works seamlessly.

@sebastianbergmann
Copy link
Owner

I have changed the implementation of DefaultTestResultCache to not use serialize() / unserialize() at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants