Framework12 min readNot archived on GitHub

Tempest: a discovery-driven PHP framework

A guide to Tempest, a modern PHP framework for web and console apps, based only on its official introduction page, with unknowns stated plainly.

PHP compatibility and project lifecycle

PHP version requirements are unknown from the supplied source. The docs' examples use property hooks, a PHP 8.4 language feature, but no minimum version is stated. Verify on the official Installation page. The demo example targets PHP 8.4 core only and does not use Tempest.

Official sources checked 2026-10-22. Browser lessons on this site run PHP 8.5.

Sources and evidence limits

It relies on one source: the introduction page of the official Tempest documentation. That page does not state versions, requirements, licensing or support status, so this guide marks those points as unknown.

What Tempest is

Tempest describes itself as a framework for PHP development that is designed to get out of your way. It targets web and console applications and aims to handle boilerplate so you can concentrate on application code. The introduction says users describe it as a sweet spot between the robustness of Symfony and the eloquence of Laravel. That is a community opinion quoted by the project, not a measured comparison.

It is a framework, not a PHP runtime and not a CMS. It runs on PHP and does not replace the PHP engine. It is also not a content management product like Drupal CMS. Drupal CMS is a product built on the Drupal ecosystem, while Tempest is a toolkit for writing your own application. The documentation navigation also lists a page called Standalone components, which suggests parts of Tempest may be usable on their own, but the supplied packet does not include that page. Treat component-level use as unverified.

Architecture ideas from the source

The introduction highlights these ideas:

  • Modern PHP features. Its examples use property hooks, attributes and proxy objects. Property hooks are a PHP 8.4 language feature, so the documentation appears to target recent PHP. The minimum supported PHP version is not stated in the supplied source. Verify it on the Installation page before installing.
  • Discovery. Tempest inspects your codebase to find routes, console commands, view components, event listeners, command handlers, middleware, schedules, migrations and more. The source says discovery is optimized for local development and fully cached in production. You can also write project-specific discovery classes.
  • Free project structure. The docs say Tempest makes no assumptions about layout, whether you prefer classic MVC, DDD, hexagonal design or something else.
  • Container-based extensibility. Parts of the framework can be replaced by implementing an interface and registering it in the container, for example a custom view renderer registered as a singleton.
  • Controller-like console commands. Console commands are methods marked with an attribute, similar to controller actions.
  • Decoupled models. The ORM examples show plain model classes with validation attributes and a query-builder style repository.
  • HTML-first views. Templates use HTML with components such as x-base and attributes such as :foreach and :if.

Execution model

The navigation lists a Framework lifecycle page under Internals and a Deployments page, but their content is not in the supplied packet. Whether Tempest is intended for classic PHP-FPM style requests, a persistent worker, or both is therefore unknown from this evidence. Do not assume worker support.

In a classic request lifetime, PHP starts the application for each request and discards almost everything when the request ends. Static properties, singletons and container state die with the request, so leaks between users are unlikely.

A persistent worker keeps the process and often the booted application alive across many requests. That can reduce repeated bootstrapping, but it adds risks:

  • State leakage. Static properties, singleton services, in-memory caches, the current user, request objects and open transactions can survive into the next request and expose one user's data to another.
  • Cleanup. Workers need an explicit reset step between requests. That means clearing request-scoped services, closing or validating database connections, ending output buffers, resetting static caches and recycling workers after errors or after a set number of requests.
  • Not interchangeable. Swoole and Open Swoole are separate projects. Do not treat them as the same thing without checking each one's own documentation. Neither is covered by the Tempest source here.

If you ever run any framework in a persistent worker, audit singletons and statics first. For Tempest, consult its lifecycle and deployment documentation before trying this.

Practical use cases

From the introduction, reasonable fits are web applications and command-line tools built in modern PHP, especially for developers who like attributes and convention-light structure. Because Tempest is described as new and still behind Symfony and Laravel in maturity, evaluate ecosystem size, package availability and long-term support yourself.

Installation approach

The introduction points to a separate Installation page, which is not included in the supplied packet. This guide therefore gives no Composer package name, command, or project skeleton, since inventing them would be unsafe. Follow the official installation instructions, check the PHP version they require, and keep your learning environment on PHP 8.4, with PHP 8.5 planned, only where Tempest's documentation says it is supported.

The example below does not install Tempest. It is a plain PHP 8.4 script that shows the underlying idea behind attribute-based discovery using core reflection. All class names are invented for the demo and are not Tempest APIs.

Strengths

  • Embraces modern PHP syntax and says it will ship built-in upgraders for breaking changes.
  • Discovery reduces manual registration of routes, commands and similar items.
  • Extension through container replacement.
  • The docs list many built-in features: mapper, validation, authentication, cache, mail, event bus, command bus, scheduling, and more.
  • Community-driven. The page reports three core members, over 50 contributors and a Discord server of close to 400 members. These figures are from the source and may be out of date.

Limitations and unknowns

  • Minimum PHP version, tested PHP versions, license, current release and support policy are unknown from the supplied evidence.
  • The page says Tempest has a way to go compared with Symfony and Laravel.
  • Lifecycle status is recorded as unknown. The source shows an active community but states no support policy.
  • Performance claims are not supported here. The source only says discovery is cached in production.
  • Worker-mode behavior is unknown.
  • This guide has no browser exercise. Real Tempest work requires Composer and a local PHP installation.

Deployment

The Deployments page exists in the documentation but is not in the packet, so no deployment recipe is given. Before going live, read it and confirm how discovery caching is built, which web server setup is expected and whether any process manager is needed. If you use FastCGI anywhere, keep it on a private network or local socket and never expose it publicly. Bind any development server to 127.0.0.1.

Links

Use the official documentation for installation, routing, discovery, the framework lifecycle and deployments.

Practical examples

These examples have not been run in a live environment yet. Commands and versions follow the official documentation linked on this page; check them before relying on them, and report a problem if one does not work.

Plain PHP 8.4 attribute discovery concept demo (not Tempest code)

A self-contained PHP 8.4 script that uses attributes, reflection and a property hook to find route-like methods on a class. It illustrates the idea behind attribute-based discovery described in the Tempest introduction. It does not install or call Tempest, and its classes are invented for the demo.

app/Route.php

<?php

declare(strict_types=1);

namespace Demo;

use Attribute;

#[Attribute(Attribute::TARGET_METHOD)]
final class Route
{
    public function __construct(public readonly string $path)
    {
    }
}

app/DiscoveredRoute.php

<?php

declare(strict_types=1);

namespace Demo;

final class DiscoveredRoute
{
    public string $label {
        get => strtoupper($this->path);
    }

    public function __construct(
        public readonly string $path,
        public readonly string $handler,
    ) {
    }
}

app/BookController.php

<?php

declare(strict_types=1);

namespace Demo;

final class BookController
{
    #[Route('/books')]
    public function index(): string
    {
        return 'Book list';
    }

    #[Route('/books/about')]
    public function about(): string
    {
        return 'About the books';
    }

    public function helper(): string
    {
        return 'Not a route';
    }
}

discover.php

<?php

declare(strict_types=1);

require_once __DIR__ . '/app/Route.php';
require_once __DIR__ . '/app/DiscoveredRoute.php';
require_once __DIR__ . '/app/BookController.php';

use Demo\BookController;
use Demo\DiscoveredRoute;
use Demo\Route;

$routes = [];
$reflection = new ReflectionClass(BookController::class);

foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
    foreach ($method->getAttributes(Route::class) as $attribute) {
        $route = $attribute->newInstance();
        $routes[$route->path] = new DiscoveredRoute($route->path, $method->getName());
    }
}

ksort($routes);

$controller = new BookController();

foreach ($routes as $discovered) {
    echo $discovered->label, ' -> ', $discovered->handler, ' -> ', $controller->{$discovered->handler}(), PHP_EOL;
}

Install and run

php -v
php discover.php

Expected behavior

With PHP 8.4 installed, the script should print two lines: /BOOKS -> index -> Book list and /BOOKS/ABOUT -> about -> About the books. The helper method has no attribute and is not listed.

This is a concept demo only, not a Tempest project, and it uses no Tempest APIs. It requires PHP 8.4 or later on the command line because of the property hook. It is not a browser exercise. For a real Tempest install, follow the official Installation page, which is not in the supplied packet.