gracious/medusa-api-client
A Laravel/PHP client for the Medusa commerce API, giving your application a clean, fluent way to query products, carts, orders, and customers. It wraps Medusa's REST endpoints behind familiar PHP methods, so you can integrate headless storefronts and backend services without hand-rolling HTTP calls.
This is a Symfony bundle, not a Laravel package — the v0.1.2 notes reference AbstractBundle::loadExtension() and HttpKernel\DependencyInjection\Extension, so there is no Laravel service provider and no package discovery. Read composer.json first: confirm type, the symfony/* constraints (now ^6.4|^7.0|^8.0), and your PHP floor before assuming it drops into a Laravel app.
composer require it, then register the client yourself as a singleton in a service provider, pulling base_url / API key from config/services.php + .env. Run composer dump-autoload -o and check for stray Symfony DependencyInjection classes being autoloaded — they'll fail outside a Symfony kernel.config/bundles.php, then create config/packages/gracious_medusa_api_client.yaml. Confirm the config root key against the bundle class — since the extension class was removed in v0.1.2, the alias now derives from the bundle, and it may not match what older docs show.bin/console debug:config <alias> (Symfony) or app()->make(Client::class) (Laravel) to confirm wiring before writing anything real.new. In Laravel, bind the client (or a thin MedusaGateway wrapper around it) as a singleton using $this->app->singleton(...) with config-driven credentials. In Symfony, autowiring handles it — just type-hint the client interface in your constructor.CatalogGateway interface, not directly on the bundle's service IDs. Swapping implementations or upgrading becomes a one-line container change.base_url, publishable/secret key, and timeouts in env vars. Never read them inside the client at call time — resolve once at container build so tests can override.Http::fake() at the transport layer if the client uses Guzzle/PSR-18 under the hood; otherwise bind a fake implementation of your gateway interface. In Symfony, KernelTestCase + static::getContainer()->set(Client::class, $fake).Cache::remember / cache.app) rather than calling per-request.GraciousMedusaApiClientExtension gone, extend behaviour by decorating the client service (Symfony decorates:) or wrapping it in Laravel — not by subclassing bundle internals.GraciousMedusaApiClientExtension. If you referenced it in a compiler pass, $container->registerExtension(), a custom kernel, or a KernelTestCase, that code breaks silently at build time (class not found) rather than at runtime. Grep your src/, tests/, and any services.yaml for the class name before bumping.AbstractBundle::loadExtension(), the extension alias is inferred from the bundle name. If your YAML root key now produces "unrecognized option" errors, that's why — check with debug:config and not the old docs.^8.0 in the constraint ≠ "tested on 8.0". The release merely allows Symfony 8; Symfony 8 requires PHP 8.4. If you're on 8.2/8.3, Composer will resolve you back to 7.x — which is fine, but don't assume 8.0 behaviour.Extension base class. Those are now gone — but that also means you lose the deprecation as a migration signal; audit your container config on upgrade rather than waiting for a warning.0.1.x, minor bumps can carry breaks (this one did). Pin ~0.1.2 or commit the lockfile; don't float on ^0.1.bin/console debug:container --show-private, debug:autowiring medusa, debug:config <alias>. In Laravel, php artisan tinker + app()->make(...) and php artisan about to confirm no phantom Symfony service providers.vendor:publish. If you expected a config file in config/, you'll need to copy the bundle's YAML defaults manually into your own config array.How can I help you explore Laravel packages today?