dmorenof / sdk-runtime
Lightweight shared PHP runtime for contract-driven SDKs.
Requires
- php: ^8.4
- guzzlehttp/guzzle: ^7.9
- guzzlehttp/psr7: ^1.9.1 || ^2.0
- opis/json-schema: ^2.6.1
- psr/http-client: ^1.0
- psr/http-message: ^1.1 || ^2.0
- typedarray/typedarray: ^1.1
Requires (Dev)
- phpstan/phpstan: ^2
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v1.9.0
- v1.8.0
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- v0.31.0
- v0.30.0
- v0.29.0
- v0.28.0
- v0.27.0
- v0.26.1
- v0.26.0
- v0.25.0
- v0.24.0
- v0.23.0
- v0.22.1
- v0.22.0
- v0.21.0
- v0.20.0
- v0.19.0
- v0.18.0
- v0.17.1
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.1
- v0.11.0
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.0
- dev-claude/busy-franklin-9x9zpa
- dev-claude/simplify-validation
- dev-feature/p0-contract-fidelity
- dev-feature/native-model-inheritance
- dev-feature/dto-directional-context
This package is auto-updated.
Last update: 2026-11-20 00:37:36 UTC
README
The shared engine behind every SDK made by sdk-generator. A generated SDK holds only what is specific to its API (models, operations, names); sending requests, authentication, validation, errors, retries and streaming live here, written and tested once. PHP 8.4+.
The runtime holds no global state: each client owns its transport and credentials.
In thirty seconds
use Acme\Accounts\{Configuration, Users}; use Acme\Accounts\DTOs\NewUser; Users::configure(new Configuration()); // an SDK generated from the API's specification $new = new NewUser(); $new->name = 'Ada'; $user = Users::post($new); // typed, validated model echo $user->id;
Documentation
| I want to… | Read |
|---|---|
| Make my first call | Getting started |
| Work with models, parameters and errors | Using an SDK |
| Pass parameters, upload files, send cookies | Sending data |
| Authenticate (API key, bearer, basic, OAuth2) | Authentication |
| Set timeouts, retries, redirects, proxies, servers | Transport and servers |
| Read headers, files, streams and error bodies | Responses |
| Understand validation and formats | Validation |
| Write or change a generator | Operation metadata |
| Look up a class | API reference |
| Know what may change between versions | Public API and versioning |
The full index, with a one-minute model of how the pieces fit, is docs/README.md. Notes on features as they were introduced in versions 0.4 to 0.31 are kept in docs/archive.
Compatibility
From 1.0.0 the package follows Semantic Versioning. What is stable, what is internal and what counts as a breaking change is defined in docs/PUBLIC_API.md.
Development
Use PHP 8.4+ and Composer 2:
composer install bash ci/run-tests.sh
Source code belongs in src/ under Dmorenof\SdkRuntime\; tests belong in tests/.
GitHub Flow
Publish each completed, validated increment through main. Use a PR only when required by repository protections and complete publication in the same task. See AGENTS.md, CONTRIBUTING.md and RELEASING.md.
License
MIT; see LICENSE.