Serialization of 'Closure' is not allowed when upload image I built up a form at the frontend to allow users to upload their avatars,my code looks like below

&lt;form method="post" accept-charset="UTF-8" enctype="multipart/form-data"&gt;
    {{ csrfInput() }}
    &lt;input type="hidden" name="action" value="users/save-user"&gt;
    &lt;input type="hidden" name="redirect" value="users/{{ currentUser.username }}"&gt;
    &lt;input type="hidden" name="userId" value="{{ currentUser.id }}"&gt;
    ...some other fields
    &lt;input type="file" name="photo"&gt;

    &lt;input type="submit" value="upload"&gt;
&lt;/form&gt;


But I got error 'Serialization of 'Closure' is not allowed' from '/Users/rain/dev/valet/tr3ndsideas/vendor/yiisoft/yii2-queue/src/serializers/PhpSerializer.php' . Any idea please
I found the problem which is because of a package called "Scout". I just update it and everything seems to be fine now.