File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,7 @@ abstract class BaseAction implements \Serializable
6161 *
6262 * NOTE: A common mistake is to call this function directly. Instead, you probably want `serialize($instance)`.
6363 *
64- * An action can only be serialized *after* it has been executed in case it needs a TAN, i.e. when the result is not
65- * present yet.
64+ * An action can only be serialized before it was completed.
6665 * If a sub-class overrides this, it should call the parent function and include it in its result.
6766 * @return string The serialized action, e.g. for storage in a database. This will not contain sensitive user data.
6867 */
@@ -72,17 +71,16 @@ public function serialize(): string
7271 }
7372
7473 /**
75- * An action can only be serialized *after* it has been executed in case it needs a TAN, i.e. when the result is not
76- * present yet.
74+ * An action can only be serialized before it was completed.
7775 * If a sub-class overrides this, it should call the parent function and include it in its result.
7876 *
7977 * @return array The serialized action, e.g. for storage in a database. This will not contain sensitive user data.
8078 * Note that this is not necessarily valid UTF-8, so you should store it as a BLOB column or raw bytes.
8179 */
8280 public function __serialize (): array
8381 {
84- if (! $ this ->needsTan ()) {
85- throw new \RuntimeException ('Cannot serialize this action, because it is not waiting for a TAN . ' );
82+ if ($ this ->isDone ()) {
83+ throw new \RuntimeException ('Completed actions cannot be serialized . ' );
8684 }
8785 return [
8886 $ this ->requestSegmentNumbers ,
You can’t perform that action at this time.
0 commit comments