Skip to content

Releases: hyperized/hostfact

API 3.1 — Typed Entities

11 Apr 20:43
9fbb95b

Choose a tag to compare

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->bag for undocumented fields

Response Improvements

  • ShowResponse->entity — typed entity object
  • ListResponse->entities — list of typed entities
  • ListResponse->pagination — pagination metadata
  • ErrorResponse now 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-objects upgraded to v2.0.0
  • Removed thecodingmachine/safe dependency
  • Response class constructors have new parameters
  • #[\Override] attribute used throughout

API 3.0

28 Nov 09:53
05377e1

Choose a tag to compare

In this release:

  • Full HostFact API 3.0 support;
  • Added PHP 8.0 & PHP 8.1 support;
  • Continued PHP 7.4 support;
  • Restructure of internals;
  • Addition of Github Actions pipelines with numerous quality checks;