davispeixoto/laravel5-salesforce
Laravel 5 Salesforce integrates Salesforce REST API access into your Laravel app, giving you a simple way to authenticate and query, create, update, or delete Salesforce records through an Eloquent-like interface.
Architecture fit
The package is a thin Laravel service-provider wrapper around the legacy Force.com PHP Toolkit (SOAP Partner/Enterprise client). Its shape is conventional for Laravel 5.x: a ServiceProvider, a Facade, a published config/salesforce.php (username, password, security token, WSDL path, SOAP options), and a Salesforce class that extends the toolkit's SforcePartnerClient/SforceEnterpriseClient so that login(), query(), create(), update(), describeSObjects() etc. are called through the container. That is a convenience wrappers, not an abstraction: SDK types (SObject, SforcePartnerClient, raw stdClass rows) leak directly into application code, and there is no repository/DTO boundary, no retry policy, no queue integration, and no test seam.
For a TPM this matters: the package accelerates a demo and impedes a production integration. Anything beyond a read-only SOQL query will require an anti-corruption layer we own.
Integration feasibility
Low cost to prove, high cost to productionize. Standing up a sandbox connection is roughly an afternoon (require, register provider/facade, publish config, drop in a WSDL, login() + query()). Making it production-grade requires: an adapter interface around the client, DTO mapping for each object, idempotency via external IDs, retry/backoff, error taxonomy, and tests against a fake — none of which ship with the package.
Hard prerequisites we must confirm before committing:
ext-soap enabled on all app/worker hosts, and outbound HTTPS to login.salesforce.com / *.my.salesforce.com.each(), create_function, dynamic-property deprecations). Verify on our actual runtime rather than trusting composer.json.extra.laravel) is likely absent — expect manual providers/aliases registration, which breaks on Laravel 11's slim skeleton.Technical risk
Key questions
ext-soap?Stack fit
Fits only on Laravel 5.5–6.x with PHP 7.x and SOAP permitted. On Laravel 9+ or PHP 8.2+, do not adopt the package. The pragmatic alternatives, in order of preference:
omniphx/forrest (REST + OAuth) or a hand-rolled Laravel HTTP-client integration against the REST/Composite/Bulk 2.0 APIs. Best long-term fit; idiomatic Laravel Http facade gives us retries, timeouts, and Http::fake() tests for free.phpforce/soap-client fork directly and write our own ~80-line service provider. This keeps the useful part and drops the unmaintained Laravel glue.Migration path
If we start on the package for velocity, isolate it immediately: define SalesforceClient (our interface) with query, upsert, delete; implement LegacyToolkitAdapter wrapping the package; bind in a service provider. Every caller depends on the interface. Swapping to REST later becomes one class plus a config flag — not a refactor. This is the single highest-leverage decision in the whole evaluation.
Compatibility
Verify by executing, not reading: composer why-not php ^8.2, a sandbox login, a SELECT Id FROM Account LIMIT 1, and a create/update round-trip. Check WSDL API version against Salesforce's supported-version matrix and pin it explicitly in config so upgrades are deliberate.
Sequencing
External_Id__c upserts, bounded retries with exponential backoff, dead-letter table.Maintenance
Assume we own it. The package is dormant; there is no upstream to wait for. Budget ongoing ownership: WSDL/API-version currency (annual, minimum), PHP/Laravel upgrade compatibility, and ext-soap presence in every new container image. Call it 10–20% of one engineer ongoing if forked and lightly customized; closer to 5% if we keep it strictly read-only and behind an adapter.
Support
No vendor, no SLA, minimal community. Salesforce Support will not troubleshoot toolkit behaviour — they will point at the API and close the case. Internal runbooks must therefore encode the diagnosis path: is it auth, WSDL, SOQL, or Salesforce-side governor limits?
Scaling
The scaling ceiling is Salesforce's, not ours:
login() per web request silently burns allocation and will exhaust it under normal traffic. Login once, cache the session ID, handle INVALID_SESSION_ID by re-authenticating once.queryMore; timeouts on wide queries are common and need explicit handling.Failure modes to instrument explicitly
INVALID_SESSION_ID — session expiry / org restart.INVALID_LOGIN — security token rotation, password change, or IP not in the org's trusted ranges (very common after a network change).REQUEST_LIMIT_EXCEEDED — allocation exhaustion; needs a circuit breaker, not retries.try/catch will report success while records silently failed. This is the most dangerous failure mode and must be handled field-by-field.create() calls on retry.Ramp-up
One backend engineer, roughly 1–2 weeks to production-ready including adapter, mapping, queueing, and tests — provided the SOAP path is validated in week 1. If Security mandates OAuth 2.0 or volume forces Bulk API, the package is out of scope entirely and the estimate becomes 3–4 weeks on a REST-based build. Recommend a one-week timeboxed spike with an explicit kill criterion, and pre-commit to the adapter boundary so the decision stays reversible.
How can I help you explore Laravel packages today?