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) {