-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Api]Add AddressDenormalizer #11693
[Api]Add AddressDenormalizer #11693
Conversation
Tomanhez
commented
Jul 28, 2020
Q | A |
---|---|
Branch? | master |
Bug fix? | yes |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
License | MIT |
72206bf
to
6d382aa
Compare
6d382aa
to
58912cd
Compare
58912cd
to
be5c59e
Compare
d4d5584
to
dc0c63d
Compare
Thank you, Tomasz! 🥇 |
@@ -28,6 +28,11 @@ | |||
<import resource="services/validator.xml" /> | |||
</imports> | |||
|
|||
<parameters> | |||
<parameter key="sylius.model.address.class.api.denormalize">%sylius.model.address.class%</parameter> | |||
<parameter key="sylius.model.address.interface.api.denormalize">Sylius\Component\Core\Model\AddressInterface</parameter> |
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.
<parameter key="sylius.model.address.interface.api.denormalize">Sylius\Component\Core\Model\AddressInterface</parameter> | |
<parameter key="sylius.model.address.interface.api.denormalize">%sylius.model.address.interface.class%</parameter> |
Therefore we could even remove these custom parameters, as we have everything from Resource. The drawback of this solution is that we will need to make type hints to the first class in the interface chain. On the contrary, it will work exactly the same as in Doctrine Mapping. In addition, we could make it work for all Sylius resource out-of-the-box.