Environment
PHP 7.2.19 (cli) (built: May 29 2019 14:17:01) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Pthread 3.2.0
Win10 x64
Summary
When I assign a object with a member of GuzzleHttp\Client to a field of my worker class, I raise an exception saying Serialization of 'Closure' is not allowed.
Reproducing Code
class TaskQueueWorker extends \Worker
{
public function __construct($client)
{
$this->client = $client;
}
}
$client is an object of a class with a sub object of GuzzleHttp\Client.
Its package information:
"name": "guzzlehttp/guzzle",
"version": "6.3.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"shasum": ""
},
"require": {
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.4",
"php": ">=5.5"
},
Expected Output
Actual Output
raise a fatal error.