A simple, extensible REST API framework for PHP

Automatic content negotiation. No magic. No bleeding into your code.

// Define a controller endpoint
class UserController extends Controller
{
    public function getById(int $id): User
    {
        return (new UserService())->getById($id);
    }
}

// Create a route
$routes->get('/users/:id')->mapsToMethod(UserController::class, 'getById');

// Run an integration test
$this->assertParsedBodyEquals(new User(1, 'Dave'), $this->get('/users/1'));

Install Aphiria


composer create-project aphiria/app --prefer-dist