PHPackages                             php-arsenal/salesforce-mapper-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. php-arsenal/salesforce-mapper-bundle

ActiveSymfony-bundle[API Development](/categories/api)

php-arsenal/salesforce-mapper-bundle
====================================

Symfony bundle that maps raw Salesforce objects with your models.

5.1.5(5mo ago)18.1k↑241.7%2MITPHPPHP &gt;=8.1CI failing

Since Dec 28Pushed 5mo agoCompare

[ Source](https://github.com/php-arsenal/salesforce-mapper-bundle)[ Packagist](https://packagist.org/packages/php-arsenal/salesforce-mapper-bundle)[ Docs](https://github.com/php-arsenal/salesforce-mapper-bundle)[ RSS](/packages/php-arsenal-salesforce-mapper-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (10)Versions (89)Used By (2)

Salesforce Mapper Bundle
========================

[](#salesforce-mapper-bundle)

[![Release](https://camo.githubusercontent.com/edb71bfd32eb36da56ee13fec4193bd970faf9ca7260df448f8132985529fa8d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7068702d617273656e616c2f73616c6573666f7263652d6d61707065722d62756e646c65)](https://github.com/php-arsenal/salesforce-mapper-bundle/releases)[![CI](https://camo.githubusercontent.com/5447483ab53ef1881e90c16c091b905a6f5c984bb28d100ab437f55b0d515a29/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7068702d617273656e616c2f73616c6573666f7263652d6d61707065722d62756e646c652f4349)](https://github.com/php-arsenal/salesforce-mapper-bundle/actions/workflows/ci.yml)[![Packagist](https://camo.githubusercontent.com/da25c59ad8790cc1dd1d4a4d1aedffaa465b6a8fde9ca8f0b9800b4c1cd29792/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d617273656e616c2f73616c6573666f7263652d6d61707065722d62756e646c65)](https://packagist.org/packages/php-arsenal/salesforce-mapper-bundle)

Introduction
------------

[](#introduction)

The Symfony bundle helps you fetch &amp; map Salesforce objects effectivelly to your own modals to use later with Doctrine or stand-alone.

Installation
------------

[](#installation)

`composer require php-arsenal/salesforce-mapper-bundle`

Features
--------

[](#features)

- Easily fetch records from Salesforce, and save these same records back to Salesforce: read-only fields are automatically ignored when saving.
- Find by criteria just like in Doctrine.
- Fetch related records in one go, so you save on [API calls](http://www.salesforce.com/us/developer/docs/api/Content/implementation_considerations.htm#topic-title_request_metering).
- Adjust the mappings to retrieve and save records exactly like you want to.
- The MappedBulkSaver helps you stay within your Salesforce API limits by using bulk creates, deletes, updates and upserts for mapped objects.
- Completely unit tested (still working on that one).

Usage
-----

[](#usage)

Once installed, the bundle offers several services that are autowired for dependancy injection:

- a mapper: `PhpArsenal\SalesforceMapperBundle\Mapper`
- a bulk saver: `PhpArsenal\SalesforceMapperBundle\MappedBulkSaver`

### Fetch filtered records

[](#fetch-filtered-records)

Use the mapper to fetch records from Salesforce. An example:

```
