Skip to content

Fix docblock DataTransformerInterface::supportsTransformation #3004

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

Conversation

cacahouwete
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

Update docblock for data transformer interface. Support method signature was wrong, object name is wrong too. It can be object or array depending if we normalize / denormalize.

@cacahouwete cacahouwete changed the title Fix docblock supportsTransformation. Fix docblock DataTransformerInterface::supportsTransformation Aug 20, 2019
@dunglas dunglas requested a review from soyuka August 20, 2019 11:44
@dunglas
Copy link
Member

dunglas commented Aug 20, 2019

Can you switch to 2.4 as target branch as it's a bug fix please?

@teohhanhui
Copy link
Contributor

I think this points to a deeper problem. The DataTransformerInterface does not differentiate the direction of transformation.

@dunglas
Copy link
Member

dunglas commented Aug 20, 2019

I think this points to a deeper problem. The DataTransformerInterface does not differentiate the direction of transformation.

Indeed, but we must merge this PR anyway. @cacahouwete let me know when the rebase is done.

@soyuka
Copy link
Member

soyuka commented Aug 21, 2019

I think this points to a deeper problem. The DataTransformerInterface does not differentiate the direction of transformation.

It has been done like this by design.

@teohhanhui
Copy link
Contributor

@soyuka I think it's bad design. Look at the code the users have to write. It's not clean.

@soyuka
Copy link
Member

soyuka commented Aug 21, 2019

@soyuka I think it's bad design. Look at the code the users have to write. It's not clean.

In fact we wanted to implement the automapper and even make this part optional. We didn't wanted to add 2 interfaces for this.

@cacahouwete cacahouwete changed the base branch from master to 2.4 August 21, 2019 14:50
@cacahouwete cacahouwete changed the base branch from 2.4 to master August 21, 2019 14:50
@cacahouwete cacahouwete changed the base branch from master to 2.4 August 21, 2019 14:54
@cacahouwete cacahouwete force-pushed the feature/fix-datatransformer-doc branch from 4eebce0 to ee43709 Compare August 21, 2019 14:55
@cacahouwete
Copy link
Contributor Author

@dunglas Rebase done.

@dunglas dunglas merged commit 8f0b897 into api-platform:2.4 Aug 23, 2019
@dunglas
Copy link
Member

dunglas commented Aug 23, 2019

Thanks @cacahouwete!

@cacahouwete cacahouwete deleted the feature/fix-datatransformer-doc branch February 3, 2020 10:12
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.

4 participants