Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix
  • Loading branch information
dunglas committed Aug 4, 2023
commit beff962fc30210b21f7202b31e2f4f10c53c6468
1 change: 0 additions & 1 deletion src/Serializer/AbstractItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public function getSupportedTypes(?string $format): array
{
return [
'object' => true,
'native-array' => true,
];
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Hal/Serializer/ItemNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testSupportsNormalization(): void
$this->assertFalse($normalizer->supportsNormalization($dummy, 'xml'));
$this->assertFalse($normalizer->supportsNormalization($std, $normalizer::FORMAT));
$this->assertEmpty($normalizer->getSupportedTypes('xml'));
$this->assertSame(['object' => true, 'native-array' => true], $normalizer->getSupportedTypes($normalizer::FORMAT));
$this->assertSame(['object' => true], $normalizer->getSupportedTypes($normalizer::FORMAT));

if (!method_exists(Serializer::class, 'getSupportedTypes')) {
$this->assertTrue($normalizer->hasCacheableSupportsMethod());
Expand Down
2 changes: 1 addition & 1 deletion tests/Serializer/AbstractItemNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function testSupportNormalizationAndSupportDenormalization(): void
$this->assertTrue($normalizer->supportsDenormalization($dummy, Dummy::class));
$this->assertFalse($normalizer->supportsDenormalization($std, \stdClass::class));
$this->assertFalse($normalizer->supportsNormalization([]));
$this->assertSame(['object' => true, 'native-array' => true], $normalizer->getSupportedTypes('any'));
$this->assertSame(['object' => true], $normalizer->getSupportedTypes('any'));

if (!method_exists(Serializer::class, 'getSupportedTypes')) {
$this->assertTrue($normalizer->hasCacheableSupportsMethod());
Expand Down
2 changes: 1 addition & 1 deletion tests/Serializer/ItemNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testSupportNormalization(): void
$this->assertTrue($normalizer->supportsDenormalization($dummy, Dummy::class));
$this->assertTrue($normalizer->supportsDenormalization($dummy, Dummy::class));
$this->assertFalse($normalizer->supportsDenormalization($std, \stdClass::class));
$this->assertSame(['object' => true, 'native-array' => true], $normalizer->getSupportedTypes('any'));
$this->assertSame(['object' => true], $normalizer->getSupportedTypes('any'));

if (!method_exists(Serializer::class, 'getSupportedTypes')) {
$this->assertTrue($normalizer->hasCacheableSupportsMethod());
Expand Down