Download the PHP package myoutdeskllc/salesforce-php without Composer

On this page you can find all versions of the php package myoutdeskllc/salesforce-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package salesforce-php

Salesforce PHP API

A beautiful, extendable API powered by Saloon.

img MyOutDeskLLC

Introduction

This API provides a feature rich, elegant baseline for working with the Salesforce API. Developers can install and leverage this API to help them integrate Salesforce easily and beautifully. These endpoints return salesforce responses, and most of the endpoints contain links to specific documentation.

Installation

composer require myoutdeskllc/salesforce-php

Features

There are many out of the box features ready for you to build upon.

Authentication

Two authentication methods are supported. OAuth and Username \ Password. OAuth is the preferred method unless you are using server to server integrations.

OAuth

OAuth is the preferred method of authentication. First, you will need to create an application in your Salesforce instance, then copy the redirect_uri, client id, and client secret to get started.

Password Authentication

Please visit YOUR_DOMAIN.com/_ui/system/security/ResetApiTokenEdit to get a security token reset. It will email the user. This must be appended to the back of the password when authenticating with the password flow unless you are using a whitelisted IP address range.

Record Level Operations

There are several methods available to execute CRUD operations on records in salesforce.

Create Records

You may either use CreateRecord or CreateRecords to insert records into Salesforce.

When creating multiple records, you may pass in a third boolean for allOrNone to determine if they should all succeed for the operation to be committed in salesforce.

Read Records

The API provides a few different ways to query records. The most common way is to use the getRecord method.

You may also queryRecords to get several records at once.

Update Records

You may update records using the updateRecord method.

Delete Records

You may delete records using the deleteRecord method.

allOrNone is supported for delete operations as a second parameter.

When updating multiple records, you may pass in a third boolean for allOrNone to determine if they should all succeed for the operation to be committed in salesforce.

Searching For Records

The API provides a few different ways to search for records.

Searching within specific Objects

Searching within specific objects, within a specific field

Searching across all objects:

Salesforce Native Objects

The API provides a few helper methods to get common objects.

You can see a full list of operations available in the StandardObjectApi

Batch Jobs

Batch job support for records is available via a job wrapper, completed with CSV support.

Soql Builder

The SOQL builder can help build out queries in your app more effectively. You'll want to make sure security is tight before it hits the builder, but it offers a fluent API to help build out queries.

output:

> SELECT Id, Name, created_at FROM Account WHERE Name = 'Test' ORDER BY created_at DESC LIMIT 20

Testing

Testing is done via PestPHP. To ensure full coverage of Salesforce features a scratch org was set up to test this against a live sandbox API. While this means expanding tests is going to be more work, it also means it's battle tested against real data.

Get a copy of the scratch org definition

Copy .env.example to .env, update the redirect_url to be your local machine URL. Set the base_url to https://test.salesforce.com.

Scratch Org Setup

  1. Signup for a developer edition organization here
  2. Login and head to the Dev Hub /lightning/setup/DevHub/home and turn the slider to enabled
  3. Install the Salesforce DX CLI
  4. Pull the salesforce-php-dx project
  5. In terminal, type sfdx force:auth:web:login --setdefaultdevhubusername and login to the developer hub
  6. Create a scratch orgsfdx force:org:create -f config/project-scratch-def.json --setalias salesforcephpdx --durationdays 7 --setdefaultusername --json --loglevel fatal
  7. Use sfdx force:org:open to open your scratch organization
  8. Execute the apex in scripts/apex/seed.apex in dev console (or use VSCODE)

Contributors


All versions of salesforce-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
sammyjo20/saloon Version ^2.0
league/csv Version ^9.8
mihasicehcek/php_salesforce_soql_builder Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package myoutdeskllc/salesforce-php contains the following files

Loading the files please wait ....