Skip to content

Commit

Permalink
Removed base64 from compressing serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Apr 2, 2024
1 parent f0b0954 commit 086ef37
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/core/etl/src/Flow/Serializer/CompressingSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function serialize(object $serializable) : string
// @codeCoverageIgnoreEnd
}

return \base64_encode($content);
return $content;
}

public function unserialize(string $serialized, string $class) : object
Expand All @@ -39,15 +39,7 @@ public function unserialize(string $serialized, string $class) : object
// @codeCoverageIgnoreEnd
}

$content = \base64_decode($serialized, true);

if (false === $content) {
// @codeCoverageIgnoreStart
throw new \RuntimeException('Unable to decode serialized data.');
// @codeCoverageIgnoreEnd
}

$content = \gzuncompress($content);
$content = \gzuncompress($serialized);

if (false === $content) {
// @codeCoverageIgnoreStart
Expand Down

0 comments on commit 086ef37

Please sign in to comment.