You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want serialize Entity with Embeddables and get this error.
Error throwed by type-hint value mismatch $doctrineMetadata->getTypeOfField() returns DoctrineType|string|null, but JMS normalizeFieldType (AbastractDoctrineTypeDriver.php) have protected function normalizeFieldType(string $type): ?string signature and error happens.
It was happened after upgrade from symfony 3 to symfony 4, and all bundles updates.
In SerializerBundle 2.3 version all working good, because there is doc-block usage instead type-hint
I think you need set nullable type-hint in normalizeFieldType function.
Steps required to reproduce the problem
Serialize any Entity with Embedded property
Expected Result
Serialized entity
Actual Result
Argument 1 passed to JMS\Serializer\Metadata\Driver\AbstractDoctrineTypeDriver::normalizeFieldType() must be of the type string, null given
The text was updated successfully, but these errors were encountered:
I want serialize Entity with Embeddables and get this error.
Error throwed by type-hint value mismatch
$doctrineMetadata->getTypeOfField()
returns DoctrineType|string|null, but JMSnormalizeFieldType
(AbastractDoctrineTypeDriver.php) haveprotected function normalizeFieldType(string $type): ?string
signature and error happens.It was happened after upgrade from symfony 3 to symfony 4, and all bundles updates.
In SerializerBundle 2.3 version all working good, because there is doc-block usage instead type-hint
I think you need set nullable type-hint in
normalizeFieldType
function.Steps required to reproduce the problem
Expected Result
Actual Result
Argument 1 passed to JMS\Serializer\Metadata\Driver\AbstractDoctrineTypeDriver::normalizeFieldType() must be of the type string, null given
The text was updated successfully, but these errors were encountered: