hgtan / salesforce-bundle
Hello Salesforce Bundle
Package info
github.com/FriendsOfBundle/HelloSalesforceBundle
Type:symfony-bundle
pkg:composer/hgtan/salesforce-bundle
dev-master / 1.0.1.x-dev
2015-07-23 08:24 UTC
Requires
- phpforce/common: dev-master
- phpforce/soap-client: *
Suggests
- guzzlehttp/guzzle: For fetching the latest WSDL from Salesforce
This package is not auto-updated.
Last update: 2026-03-15 01:11:51 UTC
README
Just a simple example bundle using Salesforce API from your Symfony2 project and the following PHPForce Soap Client:
Installation
Step 1: Using Composer
composer.json
php composer.phar require hgtan/salesforce-bundle:dev-master
Step 2 : Register the bundle
Then register the bundle with your kernel:
<?php
// in AppKernel::registerBundles()
$bundles = array(
// ...
new Hgtan\Bundle\HelloSalesforceBundle\HgtanHelloSalesforceBundle(),
// ...
);
Step 3 : Configure the bundle
# app/config/config.yml
hgtan_hello_salesforce:
soap_client:
wsdl: %kernel.root_dir%/../src/Hgtan/Bundle/HelloSalesforceBundle/Resources/wsdl/sandbox.enterprise.wsdl.xml
username: username
password: password
token: security_token
logging: true
Step 4 : Test
$ php app/console server:run
# Fetch latest WSDL from Salesforce and store it locally
$ php app/console phpforce:refresh-wsdl
Example:
http://127.0.0.1:8000/salesforce/account/pull
http://127.0.0.1:8000/salesforce/account/insert
http://127.0.0.1:8000/salesforce/account/update
http://127.0.0.1:8000/salesforce/account/delete
http://127.0.0.1:8000/salesforce/account/upsert