-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
[Bug] Fix integer Identifiers denormalization #1899
Conversation
21080a5
to
9a29741
Compare
composer.json
Outdated
@@ -34,7 +34,7 @@ | |||
"behatch/contexts": "^3.1", | |||
"doctrine/annotations": "^1.2", | |||
"doctrine/doctrine-bundle": "^1.8", | |||
"doctrine/orm": "^2.5.2", | |||
"doctrine/orm": "^2.6.0", |
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.
doctrine/orm#4884 erf php7.0 support I can't bump to 2.6.0 so the lower-deps will remain failling 😢
9a29741
to
a70487b
Compare
Can we introduce a |
@@ -30,7 +30,7 @@ class ContainNonResource | |||
/** | |||
* @var mixed | |||
* | |||
* @ORM\Column(type="integer") | |||
* @ORM\Column(type="string") |
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.
I don't get the change here
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.
I updated the test result instead
a70487b
to
5a07041
Compare
I can do that. But this denormalizer will still only cast string to int so would be a |
It would handle every doctrine types, not necessarily strings. After a second though we have everything we need for this, just do an |
edf765d
to
aa43057
Compare
I've update the code @soyuka.
|
aa43057
to
f7a7843
Compare
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.
Beautiful 👍 once green
weird |
Circle-ci is drunk and waiting for config from 2.2 branch, travis should be good |
I think that this should be done on 2.2 because it's a bug fix. May you rebase? |
f7a7843
to
1ea6f68
Compare
thanks @antograssiot |
This definitely should have been based on master :) |
@antograssiot could you reopen a merge request on master with this patch please? Really sorry for the mistake, we're all humans I guess 😄 |
Actually, just restore your branch with the github button so that I'm sure we have the patch on your remote and I'll take care of it :). |
I'll have a look tonight |
I restored the branch, I'll rebase it onto master and open a new PR, is that ok ? |
Yes, it's necessary to open a new PR because the merge functionality is gone for an already merged PR. |
1ea6f68 everything back to normal :) |
Right now the Identifier Denormalizer will automatically result in the identifier being casted to string.
This basicaly break the search filter on related entities with a strict typehint on the
getId()
because when getting references to the object in the getItemFromIri() the call togetId()
will result in a TypeError.ping @soyuka