Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Serializer] Add support for auto generated custom normalizers #52905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: 7.4
Choose a base branch
Loading
from
Prev Previous commit
Next Next commit
Removed some tests
  • Loading branch information
Nyholm committed Jan 15, 2024
commit 606e24e554ed78dcf117ffbc3dccbc6eeb99000b
Original file line number Diff line number Diff line change
Expand Up @@ -268,25 +268,12 @@ public function testDenormalizeNonExistingAttribute()
);
}

public function testNormalizeStatic()
{
$serializer = $this->getSerializer(ObjectWithStaticPropertiesAndMethods::class);
$this->assertEquals(['foo' => 'K'], $serializer->normalize(new ObjectWithStaticPropertiesAndMethods()));
}

public function testNormalizeUpperCaseAttributes()
{
$serializer = $this->getSerializer(ObjectWithUpperCaseAttributeNames::class);
$this->assertEquals(['Foo' => 'Foo', 'Bar' => 'BarBar'], $serializer->normalize(new ObjectWithUpperCaseAttributeNames()));
}

public function testThrowUnexpectedValueException()
{
$serializer = $this->getSerializer(ObjectTypeHinted::class);
$this->expectException(UnexpectedValueException::class);
$serializer->denormalize(['foo' => 'bar'], ObjectTypeHinted::class);
}

public function testDefaultObjectClassResolver()
{
$serializer = $this->getSerializer(ObjectDummy::class);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.