-
Notifications
You must be signed in to change notification settings - Fork 88
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
Simple example not working #22
Comments
When you call the |
So I had this working in a non-Laravel environment with the exact same code and libraries. Maybe Laravel is setting some kind of PHP environment or something? Looking at the spatie/async code I do not see the secret key or secret provider being set. Would this get set any other way? Maybe by an environment variable of some kind? I'm pretty sure it is an opis issue. This is the snippet from spatie:
It's pretty simple. I don't see anywhere where a secret key or provider is being set ... The |
It definitly has something to do with Laravel. Laravel also uses this library and it is setting the secret key. I think things are getting mixed up. I'm thinking the securityProvider should not be static. |
Yes, it is an issue with spatie project. In case anyone is curious: |
Technically this could all be fixed if securityProvider property was not static. Not sure why it needs to be. The Laravel and Spatie libraries are conflicting in this case. The child process of Spatie lib doesn't know anything about the Laravel lib when it sets the secret key. |
The solution to this issue was submitted to spatie/async. |
[2018-11-30 16:47:58] local.DEBUG: The serialized closure is signed. Make sure you use a security provider for both serialization and unserialization.
#0 [internal function]: Opis\Closure\SerializableClosure->unserialize('@{"closure":"a:...')
#1 /home/vagrant/code/vendor/opis/closure/functions.php(34): unserialize('C:32:"Opis\Clos...')
#2 /home/vagrant/code/vendor/spatie/async/src/Runtime/ParentRuntime.php(92): Opis\Closure\unserialize('C:32:"Opis\Clos...')
#3 /home/vagrant/code/vendor/spatie/async/src/Runtime/ChildRuntime.php(23): Spatie\Async\Runtime\ParentRuntime::decodeTask('QzozMjoiT3Bpc1x...')
#4 {main}
The $json variable is blank
The text was updated successfully, but these errors were encountered: