We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I recently tried to use the following annotation that should work as documented:
@JMS\Type("array<DateTime<'Y-m-d'>>")
But it doesn't. The DateTimes are serialized to empty strings.
While investigating the problem I found that line in the visitArray function of (e.g.) the GenericSerializationVisitor:
visitArray
GenericSerializationVisitor
$v = $this->navigator->accept($v, isset($type['params'][1]) ? $type['params'][1] : null, $context);
$type['params'][1] normally doesn't exist. The accept function is called with a null type which results in auto detection of the type.
$type['params'][1]
accept
If I change the $type['params'][1] to $type['params'][0] everything seems to work as expected.
$type['params'][0]
Is this a bug or a feature? I could also submit a pull request if this is a bug.
Thanks, Jens
The text was updated successfully, but these errors were encountered:
Sorry, moved to schmittjoh/serializer#199
Sorry, something went wrong.
No branches or pull requests
I recently tried to use the following annotation that should work as documented:
But it doesn't. The DateTimes are serialized to empty strings.
While investigating the problem I found that line in the
visitArray
function of (e.g.) theGenericSerializationVisitor
:$type['params'][1]
normally doesn't exist. Theaccept
function is called with a null type which results in auto detection of the type.If I change the
$type['params'][1]
to$type['params'][0]
everything seems to work as expected.Is this a bug or a feature? I could also submit a pull request if this is a bug.
Thanks,
Jens
The text was updated successfully, but these errors were encountered: