Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/SerializationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function startVisiting($object): void
return;
}

$this->visitingSet->attach($object);
$this->visitingSet->offsetSet($object);
$this->visitingStack->push($object);
}

Expand All @@ -81,7 +81,7 @@ public function stopVisiting($object): void
return;
}

$this->visitingSet->detach($object);
$this->visitingSet->offsetUnset($object);
$poppedObject = $this->visitingStack->pop();

if ($object !== $poppedObject) {
Expand All @@ -98,7 +98,7 @@ public function isVisiting($object): bool
return false;
}

return $this->visitingSet->contains($object);
return $this->visitingSet->offsetExists($object);
}

public function getPath(): ?string
Expand Down
2 changes: 1 addition & 1 deletion tests/Handler/FormErrorHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testSerializeFormWithData()
$builder->add('url', TextType::class);
$builder->add('txt', TextType::class, [
'constraints' => [
new Length(['min' => 10]),
new Length(null, 10),
],
]);

Expand Down
2 changes: 1 addition & 1 deletion tests/Serializer/BaseSerializationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ public function testNamedDateTimeImmutableArrays()

/** deserialized object has a default timezone set depending on user's timezone settings. That's why we manually set the UTC timezone on the DateTime objects. */
foreach ($deserializedObject->getNamedArrayWithFormattedDate() as $dateTime) {
$dateTime->setTimezone(new \DateTimeZone('UTC'));
$dateTime = $dateTime->setTimezone(new \DateTimeZone('UTC'));
}

self::assertEquals($object, $deserializedObject);
Expand Down
Loading