Skip to content

Commit

Permalink
add proxy name resolver for models
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyvastis committed Sep 9, 2021
1 parent 1818145 commit d864298
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"php": ">=8.0",
"doctrine/cache": "^1.11",
"doctrine/common": "^3.1.0",
"friendsofphp/proxy-manager-lts": "^1.0",
"php-arsenal/salesforce-bundle": "^4.0",
"sensio/framework-extra-bundle": "^6.1.0",
"symfony/dependency-injection": "^5.2",
Expand Down
3 changes: 2 additions & 1 deletion src/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use PhpArsenal\SalesforceMapperBundle\Response\MappedRecordIterator;
use PhpArsenal\SoapClient\ClientInterface;
use PhpArsenal\SoapClient\Result;
use ProxyManager\Configuration;
use ReflectionClass;
use ReflectionObject;
use stdClass;
Expand Down Expand Up @@ -404,7 +405,7 @@ public function mapToSalesforceObject($model)

/** @var Result\DescribeSObjectResult $objectDescription */
$objectDescription = $this->getObjectDescription($model);
$reflClass = new ReflectionClass($model);
$reflClass = new ReflectionClass((new Configuration())->getClassNameInflector()->getUserClassName($model));
$mappedProperties = $this->annotationReader->getSalesforceFields($model);
$mappedRelations = $this->annotationReader->getSalesforceRelations($model);
$allMappings = $mappedProperties->toArray() + $mappedRelations;
Expand Down

0 comments on commit d864298

Please sign in to comment.