Skip to content

Conversation

@hbgamra
Copy link
Contributor

@hbgamra hbgamra commented Jul 8, 2024

No description provided.

public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
{
return true === ($context['zero_datetime_to_null'] ?? false)
return ($context['zero_datetime_to_null'] ?? false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know much about the serializer ... but this change is not exactly the same. Before, only true (and false) are valid. If we remove the true === condition, any value that converts to true (like (int) 2 or (string) foo) will be allowed too.

But maybe I'm missing something here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say you are right @javiereguiluz

https://3v4l.org/cWCSA

@OskarStark
Copy link
Contributor

As this is a minor, let's keep it like this. thanks for proposing

@OskarStark OskarStark closed this Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants