- How do I install electivegroup/api-clients-php in a Laravel application?
- Install it like any other Composer dependency by running composer require electivegroup/api-clients-php. The README only documents the PHP 7.1+ requirement and the Composer install step, so there is no publishable config, migration, or artisan command to run afterwards. Once installed, bind the client in a service provider and resolve it through the container rather than instantiating it in controllers.
- Is electivegroup/api-clients-php a Laravel package?
- No. It is a vendor SDK that wraps Elective's HTTP APIs, not a Laravel framework component. There is no service provider, facade, config file, or migration contract detectable in the README. Treat it as infrastructure that you wrap yourself, not as something that shapes your domain model.
- Which Laravel and PHP versions does this SDK support?
- The only documented requirement is PHP 7.1 or higher, which is well below modern Laravel runtimes, so it will install on Laravel 9, 10, and 11 in practice. There is no stated Laravel version constraint because the package does not depend on the framework at all. That low floor also hints at a codebase predating modern typing and PSR-18/PSR-17 abstractions.
- Does this package register a service provider or facade?
- Nothing in the README indicates a service provider, facade, or auto-discovered package manifest. You will need to write your own binding in a Laravel service provider. That is actually preferable here, because it lets you expose the SDK only through a domain-owned interface and keep the vendor namespace out of your application code.
- How do I configure authentication, base URI, and timeouts for the Elective API client?
- The README is effectively a stub and documents no configuration surface, so the constructor arguments and credential handling must be read from the source or from Elective's API reference. Budget a short discovery spike before committing scope. Once known, keep credentials in your secrets manager and expose them through config/ rather than hardcoding them at call sites.
- Can I inject my own HTTP client for retries, tracing, and proxies?
- This cannot be confirmed from the repository. An SDK with a PHP 7.1+ floor plausibly ships its own transport or a bundled Guzzle client rather than implementing PSR-18/PSR-17. If it does not accept an injected client, you lose substitutability with Laravel's HTTP client and your observability stack, so verify this before adopting it.
- How should I test code that depends on this Elective SDK?
- Because the package exposes no Laravel testing helpers or fakes, mock at your own boundary instead. Define a domain interface around the Elective calls, bind a fake implementation in your test suite, and let the SDK itself be exercised only by a small integration test. There is no visible CI or test signal in the package, so do not assume its error paths are covered for you.
- How do I handle timeouts, rate limits, and 5xx errors with this client?
- There is no documented response or exception contract, so you must read the source to learn how failures surface. Do not assume it models rate limits, idempotency keys, or pagination explicitly. Wrap every call in your own retry and timeout policy, and translate vendor exceptions into your application's exception types at the boundary.
- Is electivegroup/api-clients-php safe to use in production?
- It is MIT licensed and Composer-installable, but it has zero stars, zero dependents, a single publisher, and one release tag from June 2024. There is no evidence of external consumers, community maintenance, or a release cadence, so if Elective stops publishing you own a fork. Pin the exact version, treat every upgrade as a potential breaking change, and plan for the maintenance cost.
- What are the alternatives to using this SDK in a Laravel app?
- If Elective's APIs are a real data or workflow source for you, the SDK removes hand-rolled auth and request plumbing, which is its main value. Otherwise call the API directly with Laravel's Http client, which gives you Guzzle-based retries, middleware, fakes, and tracing out of the box. Only adopt the SDK if Elective is genuinely in scope on your roadmap.