- What does crescat-io/saloon-sdk-generator do?
- It is a Composer CLI tool that generates PHP SDKs from OpenAPI specifications using Saloon. It turns API definitions into typed connectors, requests, and resources so you write less boilerplate HTTP client code. It is intended for developer tooling and SDK delivery pipelines, not as a runtime dependency in your Laravel application.
- How do I install crescat-io/saloon-sdk-generator?
- Install it globally with Composer as a developer CLI tool. The generator is not meant to be added as a runtime dependency of your Laravel app. Pin the version in CI images or setup scripts to avoid global Composer version drift.
- Does crescat-io/saloon-sdk-generator work with Laravel?
- Yes, it fits Laravel and PHP teams that use Saloon as their HTTP integration layer. The generator itself requires saloonphp/laravel-plugin ^4.0 in v1.6.0, so your tooling environment must resolve the Saloon v4 Laravel plugin. Generated SDKs can then be consumed by Laravel applications.
- Which Saloon versions do generated SDKs support?
- Generated SDKs can declare saloonphp/saloon ^3.0|^4.0, so consuming applications can stay on Saloon v3 temporarily or adopt v4. The generator v1.6.0 itself requires Saloon ^4.0, which means tooling and runtime versions can be sequenced separately. You should still regression-test generated SDKs against both versions if you support both.
- Does upgrading to generator v1.6.0 require regenerating existing SDKs?
- Yes, existing generated SDKs do not automatically receive changes such as the multi-authenticator fix. You must regenerate the SDKs to pick up updated generated code. Review auth-related diffs carefully before publishing internal SDK updates.
- What changed for multi-authenticator connectors in v1.6.0?
- The generated auth behavior changed from getAuthenticator() to defaultAuth() for multi-authenticator connectors. This is likely a corrective change, but treat it as a behavior change. Regenerate affected SDKs and run targeted auth-selection tests before broad rollout.
- Is the generated SDK a runtime dependency?
- No, the generator is a developer-time code generation tool. The generated SDK is the runtime code your Laravel app consumes, typically committed to your repo or published as an internal Composer package. Keep generator upgrades separate from runtime Saloon upgrades.
- How should I roll out generator v1.6.0 safely?
- Inventory generator usage, generated SDKs, and runtime Saloon versions first. Pin v1.6.0 in developer tooling or CI, regenerate a representative SDK set in a branch, and review diffs. Then run generated SDK tests against Saloon v3 and v4 before publishing internal packages and upgrading runtime apps where needed.
- Are generated SDKs tested against Saloon v3 and v4 in CI?
- The provided context does not confirm CI testing against both versions; compatibility is declared through Composer constraints. You should add your own regression tests for generated SDKs against Saloon v3 and v4 if you support both. Pay special attention to Laravel plugin integration, auth flows, and Composer resolution.
- Can I use generated SDKs in production Laravel apps?
- Yes, generated SDKs are intended to be consumed by applications as typed Saloon connectors, requests, and resources. The generator itself should stay in development and CI tooling. Pin the generator version and assign ownership for regeneration cadence and generated diff review.