Break dependence of SOAP extension on DataType values
commit5dca88b3c83650d4faa8a0925d9c137bc3a3f4c0
authorRick Lavoie <rlavoie@fb.com>
Fri, 8 Jul 2016 05:31:11 +0000 (7 22:31 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Sun, 10 Jul 2016 05:32:31 +0000 (9 22:32 -0700)
tree783e2ab18665f5bb351226bd264deac2f2cff7b9
parentf33ecbd1f11622d9f259cb0706cc3b7801064a09
Break dependence of SOAP extension on DataType values

Summary:
The SOAP extension defines various integer values to represent types
internally. However, these values are defined as a super-set of our DataType
values, so that it can use Variant::getType() to directly map to one of its
equivalent types. This is annoying because it means if we adjust the DataType
values, we might have to likewise adjust the SOAP type values (which are visible
in PHP). Break this dependence by adding a mapping function which maps DataType
values to their equivalent SOAP values, and use that where-ever needed.

Reviewed By: edwinsmith

Differential Revision: D3515731

fbshipit-source-id: c3a17f5f897a84b9085f4d48d418d81a33df1886
hphp/runtime/ext/soap/encoding.cpp
hphp/runtime/ext/soap/encoding.h
hphp/runtime/ext/soap/ext_soap.cpp
hphp/runtime/ext/soap/packet.cpp