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
Fix tests #3698
Fix tests #3698
Conversation
@@ -200,6 +201,6 @@ private function getReferenceType(string $resourceClass, ?int $referenceType): ? | |||
$referenceType = $metadata->getAttribute('url_generation_strategy'); | |||
} | |||
|
|||
return $referenceType; | |||
return null === $referenceType ? UrlGeneratorInterface::ABS_PATH : $referenceType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return null === $referenceType ? UrlGeneratorInterface::ABS_PATH : $referenceType; | |
return $referenceType ?? UrlGeneratorInterface::ABS_PATH; |
@@ -78,6 +79,11 @@ private function fieldsToAttributes(?string $resourceClass, ?ResourceMetadata $r | |||
$fields = $info->getFieldSelection(PHP_INT_MAX); | |||
} | |||
|
|||
// On lowest symfony dependencies there's a bug in the name converter not accepting a string in the group ssee https://github.com/symfony/symfony/pull/34490 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// On lowest symfony dependencies there's a bug in the name converter not accepting a string in the group ssee https://github.com/symfony/symfony/pull/34490 | |
// On lowest symfony dependencies there's a bug in the name converter not accepting a string in the group see https://github.com/symfony/symfony/pull/34490 |
I suggest to require symfony/serializer
>=4.3.9 instead.
@@ -78,6 +79,11 @@ private function fieldsToAttributes(?string $resourceClass, ?ResourceMetadata $r | |||
$fields = $info->getFieldSelection(PHP_INT_MAX); | |||
} | |||
|
|||
// On lowest symfony dependencies there's a bug in the name converter not accepting a string in the group ssee https://github.com/symfony/symfony/pull/34490 | |||
if (isset($context[AbstractNormalizer::GROUPS]) && !\is_array($context[AbstractNormalizer::GROUPS])) { | |||
$context[AbstractNormalizer::GROUPS] = [$context[AbstractNormalizer::GROUPS]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be (array) $context[AbstractNormalizer::GROUPS]
too.
3eb83e5
to
e42ff50
Compare
Fixes the tests: