diff --git a/CHANGELOG.md b/CHANGELOG.md index 1427bed..f2e17f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Drop support for PHP 7.2 and 7.3 * Require `guzzlehttp/guzzle` ^8.0, `guzzlehttp/promises` ^3.0, and `guzzlehttp/psr7` ^3.0 * Add generic PHPDoc return types to asynchronous service client APIs +* Reject native PHP serialization of `ServiceClient` * Require custom implementations and subclasses of public command APIs to match native method signatures * Require service client response transformers to return `ResultInterface` values * Require custom middleware, transformers, and `executeAll()` callbacks to accept exact argument types instead of relying on scalar coercion diff --git a/UPGRADING.md b/UPGRADING.md index 25fdb10..d18e65f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -88,6 +88,11 @@ the command key. `executeAllAsync()` callback annotations include the same first two arguments plus the aggregate promise as a third argument. Lower-arity userland callbacks continue to work at runtime when PHP accepts them. +#### Native PHP Serialization of Service Clients + +`ServiceClient` no longer supports native PHP `serialize()` or `unserialize()`. +Persist command names and parameter arrays instead of runtime client objects. + 1.0 from 0.8 ------------ diff --git a/src/NonSerializableTrait.php b/src/NonSerializableTrait.php new file mode 100644 index 0000000..03007c3 --- /dev/null +++ b/src/NonSerializableTrait.php @@ -0,0 +1,21 @@ +> */