Closed ddeboer closed 2 years ago
@dunglas This PR adds return types in all places where Symfony 6 has them.
Do you mean adding return types too where Symfony/Doctrine don’t (yet) have them but only have PHPDoc @return
annotations?
Yes! But I can handle it.
No worries, I’ll add it here.
to not have to introduce new BC breaks later for the same reason.
Adding return types is no BC break, except for users extending this library, but this library’s Serializer
and JsonDocumentType
classes are final.
So this PR currently isn’t a break because of the return types themselves but because of the fact that PHP 8 is required for return types in general. I’m not even sure that has to count as a BC break.
@dunglas Done.
Travis CI file must also be updated as well to remove support for PHP 7.x versions right?
@hhamon See #103 for the build pipeline.
I crafted an alternative patch allowing to support both PHP 7.1 and Symfony 6: https://github.com/dunglas/doctrine-json-odm/pull/110
BREAKING CHANGE: requires PHP 8.0 for union types.
Fix #99, ref #101.