vin-sw/shopware-sdk
A PHP SDK for Shopware 6 APIs, offering object-oriented access to the Admin API (CRUD, Sync, User Config, Notification, Search) plus webhook registration, authentication, and receiver helpers. Compatible with Shopware 6.5+ on SDK 2.x.
Architecture fit
Shape-and-Shift/shopware-laravel-sdk adapter, which is scoped to Laravel 8 — an EOL version). Plan for a thin internal wrapper package.Criteria, filters, associations, entity definitions, Context — to be productive. The value is typed entity/collection classes and OAuth handling, not simplification of the domain.Context object is the unit of tenancy: one shop URL + token per context. Multi-shop means managing a context/token registry ourselves — there is no pool, tenant resolver, or connection manager.Integration feasibility
composer require vin-sw/shopware-sdk, MIT, ext-curl, PHP ≥7.4). Guzzle-based, and the changelog references injecting "the same http client as the repository," so middleware/retry hooks are feasible — but we must wire them.AdminAuthenticator::fetchAccessToken() returns a token; the README explicitly tells you to persist it yourself. There is no refresh scheduler, no expiry-aware caching, no lock to prevent thundering-herd re-auth across workers. This is a required piece of our build.WebhookAuthenticator::authenticatePostRequest($shopSecret)) is security-critical and lives in a 119-star, single-maintainer package. We should review that code path directly before trusting it in production.Technical risk
syncDeleted using the wrong HTTP client, version-delete broken, searchIds not throwing on error responses. These suggest edge-case coverage is thin — assume we are the QA for anything unusual.vin-sw/shopware-sdk), README badge (vin-sw/shopware-php-sdk), and namespace (Vin\ShopwareSdk) all differ. Trivial, but a signal of maturing-not-mature stewardship.Key questions
Stack fit
config/shopware.php, no Shopware facade, no Http:: client, no queued jobs, no events.acme/shopware) that (a) binds Context construction to a tenant registry, (b) owns a token cache with expiry and a distributed lock, (c) injects a Guzzle client configured with retry/backoff and structured logging, (d) exposes typed methods to the rest of the app so the SDK's classes never leak into controllers.Http/Guzzle middleware for observability.Migration path
^2.4 (or the latest 2.x) with a committed composer.lock; do not float.Compatibility
ext-curl, Shopware ≥6.5.Sequencing
InfoService call, one search on ProductDefinition — proves connectivity and token handling in under a day.Criteria builder helpers, response DTOs) behind a feature flag.SyncService returns per-entity errors rather than throwing; we must parse and dead-letter.Maintenance
Support
Scaling
limit/pagination discipline in the wrapper; never pass an unbounded Criteria through.SyncService batches with explicit chunk sizes, and throughput is bounded by the shop's own API capacity, not ours.Failure modes to design for
ShopUnreachableException on network/DNS/timeouts → retry with backoff, then dead-letter; never block a user request on it.searchIds) → must be parsed and surfaced; silent success is the dangerous case.Ramp-up
Criteria, filters, associations, inheritance, versioning) is the real prerequisite, and the SDK deliberately exposes it rather than hiding it.Criteria builder so engineers rarely touch raw DAL constructs.How can I help you explore Laravel packages today?