From 79c62e987512131c0ecd700bf0fe34c4945b3447 Mon Sep 17 00:00:00 2001 From: avolver <avolver@gmail.com> Date: Sun, 10 Feb 2019 15:18:49 +0300 Subject: [PATCH] Fix serialization without touch pseudo-rich calls --- composer.json | 2 +- src/SixDreams/RichModel/Traits/RichModelTrait.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a985fc6..f5ac8cd 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "6dreams/rich-model-trait", "description": "A rich replacement for your anemic getters and setters", - "version": "0.6.4", + "version": "0.6.5", "type": "library", "license": "MIT", "authors": [ diff --git a/src/SixDreams/RichModel/Traits/RichModelTrait.php b/src/SixDreams/RichModel/Traits/RichModelTrait.php index 55b97a0..640bdee 100644 --- a/src/SixDreams/RichModel/Traits/RichModelTrait.php +++ b/src/SixDreams/RichModel/Traits/RichModelTrait.php @@ -190,9 +190,12 @@ public function __call($name, array $arguments = []) * {@inheritdoc} * * @return array + * + * @throws RichModelFieldException */ public function __sleep() { + $this->initRichModelUtils(); return (array) \array_reduce( $this->richClassReflection->getProperties(), function (array $items, \ReflectionProperty $property) {