Skip to content
Antares

Introduction

Antares is a lightweight, API-focused PHP framework built around explicitness, type safety, and contract-first design.

You describe each endpoint with typed classes: a request DTO for what comes in, a response DTO for what goes out. From that one contract, Antares validates every request, serializes every response, and generates your OpenAPI spec and Swagger docs. You declare it once and it can’t drift. For the story and vision behind it, read Why Antares.

It provides everything you need to build a modern JSON API — a DI container, attribute-based routing, DTO hydration & validation, response serialization, a middleware pipeline and auto-generated OpenAPI docs — with zero magic and no hidden conventions.

  • Contract-first. Typed requests in, typed responses out. Validation, serialization and docs are all derived from the same classes.
  • Explicit over implicit. Routes are defined where you can see them — attributes, array config, or YAML. No naming conventions that change behaviour silently.
  • Type-safe by default. PHP 8.2+ typed DTOs, hydration that casts and checks every field, and reflection-based resolution throughout.
  • Composable packages. Each concern lives in its own Composer package. Use the full framework or pull in just the container, router, or validation package.
  • No configuration tax. Route caching and cache invalidation in production, and bridge auto-discovery.
  • Zero bootstrap overhead. Built for worker runtimes — Swoole and FrankenPHP keep the app alive between requests.
PackageComposer nameDescription
corefatjon-lleshi/antaresApplication boot, Dispatcher, Pipeline, ErrorHandler, response serialization, OpenAPI, CLI, migrations
containerfatjon-lleshi/antares-containerReflection-based autowiring DI container
routerfatjon-lleshi/antares-routerAttribute-based routing on top of nikic/fast-route
validationfatjon-lleshi/antares-validationDTO hydration + attribute-driven validation
bridges/monologfatjon-lleshi/antares-monolog-bridgePSR-3 logger via Monolog
bridges/eloquentfatjon-lleshi/antares-eloquent-bridgeEloquent ORM integration
  • PHP 8.2+