Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  fix compatibility with Redis Relay 0.8.1
  use more entropy with uniqid()
  [Cache] Improve `dbindex` DSN parameter parsing
  Support for PHP-CS-Fixer's parallel runner
  use more entropy with uniqid()
  [Contracts][HttpClient] Skip tests when zlib's `ob_gzhandler()` doesn't exist
  • Loading branch information
xabbuh committed Jul 17, 2024
2 parents 3bfc744 + 430a73d commit 79b073c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Debug/TraceableSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(

public function serialize(mixed $data, string $format, array $context = []): string
{
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid();
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid('', true);

$startTime = microtime(true);
$result = $this->serializer->serialize($data, $format, $context);
Expand All @@ -52,7 +52,7 @@ public function serialize(mixed $data, string $format, array $context = []): str

public function deserialize(mixed $data, string $type, string $format, array $context = []): mixed
{
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid();
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid('', true);

$startTime = microtime(true);
$result = $this->serializer->deserialize($data, $type, $format, $context);
Expand All @@ -67,7 +67,7 @@ public function deserialize(mixed $data, string $type, string $format, array $co

public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
{
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid();
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid('', true);

$startTime = microtime(true);
$result = $this->serializer->normalize($object, $format, $context);
Expand All @@ -82,7 +82,7 @@ public function normalize(mixed $object, ?string $format = null, array $context

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid();
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid('', true);

$startTime = microtime(true);
$result = $this->serializer->denormalize($data, $type, $format, $context);
Expand All @@ -97,7 +97,7 @@ public function denormalize(mixed $data, string $type, ?string $format = null, a

public function encode(mixed $data, string $format, array $context = []): string
{
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid();
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid('', true);

$startTime = microtime(true);
$result = $this->serializer->encode($data, $format, $context);
Expand All @@ -112,7 +112,7 @@ public function encode(mixed $data, string $format, array $context = []): string

public function decode(string $data, string $format, array $context = []): mixed
{
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid();
$context[self::DEBUG_TRACE_ID] = $traceId = uniqid('', true);

$startTime = microtime(true);
$result = $this->serializer->decode($data, $format, $context);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Mapping/Factory/ClassMetadataFactoryCompilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class ClassMetadataFactoryCompilerTest extends TestCase

protected function setUp(): void
{
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_serializer_metadata.'.uniqid('CompiledClassMetadataFactory').'.php';
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_serializer_metadata.'.uniqid('CompiledClassMetadataFactory', true).'.php';
}

protected function tearDown(): void
Expand Down

0 comments on commit 79b073c

Please sign in to comment.