poagen
Point poagen at an OpenAPI 3.0 or 3.1 document and get a typed PHP 8.4 client you never edit.
poagen reads an OpenAPI 3.0 or 3.1 document and emits a PHP 8.4 HTTP client. The generated tree is disposable: every run rewrites it whole, and your own code lives beside it.
Why poagen
- Typed. Exhaustive PHPStan annotations, backed enums, readonly models, and one method per operation.
- Extensible. Guidance lives in a typed
Profileand in attributes on your own value objects, never in an edit to generated code. - PSR-aligned. The emitted client depends on PSR-18, PSR-17 and PSR-7, so Guzzle, Symfony HTTP Client, or anything else that implements them plugs in.
- Proven on real documents. Petstore, DigitalOcean, GitHub, and kilbil’s loyalty API all generate and pass their own gates.
Start
composer require poagen/client-runtime
composer require --dev poagen/client-generatorWrite a profile, generate, and call the result. The quickstart takes you from an empty project to a first response.
Documentation
- Quickstart
- Installation
- Profile reference
- What gets generated
- Formats and value objects
- CLI reference
- Examples
- Status and limits
The source lives at github.com/mlavrinenko/poagen.