Releases: hyperized/hostfact
Releases · hyperized/hostfact
API 3.1 — Typed Entities
What's New
Typed Entities
API responses now include fully typed entity objects with IDE autocompletion:
- 12 entity classes: Product, Debtor, Invoice, Domain, Hosting, Ssl, Vps, Ticket, Order, PriceQuote, Creditor, Group
- 18 backed enums for API value sets (Status, Sex, Periodic, ProductType, etc.)
- Strict types:
?int,?bool,?\DateTimeImmutable, enums — strings only where the API returns strings - Nested entities: InvoiceLine, OrderLine, PriceQuoteLine, TicketMessage, Subscription, GroupItem
- DataBag fallback via
$entity->bagfor undocumented fields
Response Improvements
ShowResponse->entity— typed entity objectListResponse->entities— list of typed entitiesListResponse->pagination— pagination metadataErrorResponsenow preserves real controller/action on JSON parse failures
Security
- Exception messages no longer expose request URLs or API keys
Breaking Changes
- PHP 8.4+ required (dropped 8.3)
hyperized/value-objectsupgraded to v2.0.0- Removed
thecodingmachine/safedependency - Response class constructors have new parameters
#[\Override]attribute used throughout