Skip to content
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

Argument 1 passed to JMS\Serializer\Metadata\Driver\AbstractDoctrineTypeDriver::normalizeFieldType() must be of the type string, null given #701

Closed
dekamaru opened this issue Dec 4, 2018 · 1 comment

Comments

@dekamaru
Copy link

dekamaru commented Dec 4, 2018

Version: 3.0

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.

@dekamaru
Copy link
Author

dekamaru commented Dec 4, 2018

Wrong repository, close issue

@dekamaru dekamaru closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant