Skip to content

identifier normalizer code review #1820

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

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Apr 6, 2018

@soyuka soyuka force-pushed the fix/identifier-normalizer-1309 branch from b2b0e9e to db038f0 Compare April 6, 2018 13:09
@@ -51,19 +49,23 @@ public function denormalize($data, $class, $format = null, array $context = [])
{
$keys = $this->identifiersExtractor->getIdentifiersFromResourceClass($class);

if (empty($keys)) {
Copy link
Member

@meyerbaptiste meyerbaptiste Apr 6, 2018

Choose a reason for hiding this comment

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

if (!$keys)

@soyuka soyuka force-pushed the fix/identifier-normalizer-1309 branch from db038f0 to 81e1ea6 Compare April 6, 2018 13:25
Copy link
Member

@meyerbaptiste meyerbaptiste left a comment

Choose a reason for hiding this comment

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

🎉but now you have to fix tests!

@soyuka soyuka force-pushed the fix/identifier-normalizer-1309 branch 3 times, most recently from 853dda8 to 78a54c6 Compare April 6, 2018 15:20
@meyerbaptiste
Copy link
Member

@soyuka That makes me think the contract of the DenormalizerInterface::denormalize() method is to return an object but our ChainIdentifierNormalizer::denormalize() method returns an array...

@soyuka
Copy link
Member Author

soyuka commented Apr 6, 2018

don't merge yet please @Simperfit :p

@soyuka soyuka force-pushed the fix/identifier-normalizer-1309 branch from 1d71cee to 7a45c98 Compare April 6, 2018 17:28
@soyuka soyuka merged commit 09aa18f into api-platform:master Apr 6, 2018
@soyuka soyuka deleted the fix/identifier-normalizer-1309 branch April 6, 2018 20:04
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

Successfully merging this pull request may close these issues.

3 participants