Skip to content

Commit

Permalink
Merge pull request #15 from advisors-excel-llc/develop
Browse files Browse the repository at this point in the history
Fix the serializer in the Bulk Client
  • Loading branch information
curiosity26 committed Oct 25, 2018
2 parents e707916 + 90248ef commit c0cf347
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Bulk/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
use AE\SalesforceRestSdk\AuthProvider\AuthProviderInterface;
use AE\SalesforceRestSdk\AuthProvider\SessionExpiredOrInvalidException;
use AE\SalesforceRestSdk\Rest\AbstractClient;
use AE\SalesforceRestSdk\Serializer\CompositeSObjectHandler;
use AE\SalesforceRestSdk\Serializer\SObjectHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Request;
use JMS\Serializer\Handler\HandlerRegistry;
use JMS\Serializer\Naming\IdenticalPropertyNamingStrategy;
use JMS\Serializer\SerializerBuilder;
use JMS\Serializer\SerializerInterface;
Expand Down Expand Up @@ -96,6 +99,12 @@ protected function createSerializer(): SerializerInterface
->addDefaultListeners()
->addDefaultDeserializationVisitors()
->addDefaultSerializationVisitors()
->configureHandlers(
function (HandlerRegistry $handler) {
$handler->registerSubscribingHandler(new SObjectHandler());
$handler->registerSubscribingHandler(new CompositeSObjectHandler());
}
)
;

return $builder->build();
Expand Down

0 comments on commit c0cf347

Please sign in to comment.