Every response now goes through CamelCaseHelper::keysToCamelCase() function because relying on only the model mapper caused inconsistencies (if the model contained a property that is defined just as an object, not a specific model - like this one - then the keys of this object were not camel-cased).
Also, if json_encode() is run over the response then everything is now consistently snake_cased (as in the raw response)
Testing:
install this branch: composer require pipedrive/pipedrive:dev-GRAL-2093-camel-case
check the README how to set up a simple sample script and try it out on controllers which use models which have plain objects defined as properties.
For example, $client->getDeals()->getDetailsOfADeal(123); now (left) vs before (right):
Fixes https://github.com/pipedrive/client-php/issues/42
Every response now goes through
CamelCaseHelper::keysToCamelCase()
function because relying on only the model mapper caused inconsistencies (if the model contained a property that is defined just as anobject
, not a specific model - like this one - then the keys of this object were not camel-cased).Also, if
json_encode()
is run over the response then everything is now consistently snake_cased (as in the raw response)Testing:
composer require pipedrive/pipedrive:dev-GRAL-2093-camel-case
For example,
$client->getDeals()->getDetailsOfADeal(123);
now (left) vs before (right):