vortexphp/framework

Lightweight PHP application stack (app/, engine/, config, assets)

Maintainers

Package info

github.com/vortexphp/framework

pkg:composer/vortexphp/framework

Statistics

Installs: 14

Dependents: 2

Suggesters: 0

Stars: 1

Open Issues: 0

v0.5.0 2026-04-03 19:23 UTC

This package is auto-updated.

Last update: 2026-04-03 22:13:04 UTC


README

Lightweight PHP application stack: HTTP routing, Twig views, PDO database layer, mail, cache, config, console, events, validation, and i18n.

Install

composer require vortexphp/framework

Requires PHP 8.2+, ext-mbstring, ext-pdo, and Twig 3. For SMTP with TLS/SSL, install ext-openssl (see composer.json suggest).

Project layout

The framework expects a base path (your app root) with at least:

  • config/ — configuration read by Vortex\Config\Repository
  • config/paths.php (optional) — return ['migrations' => '…'] relative to the project root; default is db/migrations
  • app/Routes/*.php — HTTP route files (required in order; register via Vortex\Routing\Route; optional ->name('key') + route('key', $params))
  • app/Routes/*Console.php — console route files (return callable(ConsoleApplication): void)
  • assets/views/ — Twig templates (used by Vortex\Application::boot())
  • storage/cache/twig/ — optional Twig cache when app.debug is false

Quick start

<?php

declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use Vortex\Application;

$app = Application::boot(__DIR__); // loads `.env`, registers core services; optional 2nd arg: ?callable $configure(Container, $basePath)
$app->run(); // or use Http\Kernel with global middleware from config

Use the Vortex\ namespace for framework types. See the test suite under tests/ for concrete usage patterns.

Testing HTTP in-process: Kernel::handle(Request::make('GET', '/path')) returns a Response without sending output; register ErrorRenderer on the container when using the full error stack (see tests/KernelHandleTest.php).

Changelog

See CHANGELOG.md.

License

MIT.