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

Declaration of Double unserialize() is not compatible with mocked class #438

Open
rodrigodiez opened this issue Jul 23, 2019 · 0 comments
Open

Comments

@rodrigodiez
Copy link

I am trying to mock an instance of Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken which, since Symfony 4.3 requires an array as a parameter for its unserialize method. commit

When running phpspec I get the following message:

PHP Fatal error:  Declaration of Double\Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken\P711::__unserialize() must be compatible with Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken::__unserialize(array $data): void in /var/www/html/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php(49) : eval()'d code on line 2
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

No branches or pull requests

1 participant