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

Fix #3979 identifier chain not breaking after denormalizing #3985

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Jan 26, 2021

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tickets fixes #3979
License MIT
Doc PR na
  • lower priority of our identifier denormalizer for better DX
  • break the chain of normalizers when an identifier transformer is found

@soyuka soyuka changed the base branch from main to 2.6 January 26, 2021 15:59
@soyuka soyuka changed the title Fix #3979 lower identifier denormalizer priority for better DX Fix #3979 identifier chain not breaking after denormalizing Jan 26, 2021
@soyuka soyuka force-pushed the fix/3979 branch 2 times, most recently from fce8384 to 637d8da Compare January 27, 2021 07:54
@@ -69,6 +69,7 @@ public function convert($data, string $class, array $context = []): array

try {
$identifiers[$identifier] = $identifierTransformer->denormalize($value, $type);
break;
} catch (InvalidIdentifierException $e) {
throw new InvalidIdentifierException(sprintf('Identifier "%s" could not be denormalized.', $identifier), $e->getCode(), $e);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add test

@soyuka soyuka added this to the 2.6.2 milestone Feb 1, 2021
@soyuka soyuka merged commit 837dc48 into api-platform:2.6 Feb 2, 2021
@soyuka soyuka deleted the fix/3979 branch February 2, 2021 14:43
cacahouwete pushed a commit to cacahouwete/core that referenced this pull request Feb 8, 2021
…ng (api-platform#3985)

* Lower the priority of our identifier denormalizers

* Break on supported denormalizer

* add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

identifier denormalizer does not work anymore with custom needs.
1 participant