PHP Framework: Tempest 3.0 brings new error handler
The young PHP framework appears in version 3.0 with mandatory PHP 8.5, a new exception handler, faster ORM, and modernized CSRF protection for web applications.
(Image: Panwasin seemala / Shutterstock.com)
Tempest 3.0 has been released. The still quite young PHP framework brings a new exception handler, performance optimizations, support for PHP 8.5, and numerous detailed changes. The project has 2100 stars on GitHub.
The tool is aimed at developers who want to implement web applications with an integrated stack of routing, ORM, view system, console, and OAuth integration. It bundles typical infrastructure tasks and consistently relies on current PHP versions. Among others, Brent Roose is behind the project, who keeps the community up-to-date on innovations around the programming language at stitcher.io.
Focus on PHP 8.5
Version 3.0 exclusively supports PHP 8.5 or newer. The project thus sticks to its line of only considering the current PHP version. This is intended to facilitate the use of new language features but requires a correspondingly modern runtime environment.
Videos by heise
New Exception Handler and ORM Updates
Instead of the PHP library Whoops, Tempest now uses its exception handler, which can apparently be integrated more closely into the framework and is intended to improve debugging.
In the database area, the ORM has become more performant, according to the development team. Support for UUIDs (Universally Unique Identifier) as primary keys is also new. The method Query::toRawSql has been revised to make complex queries more comprehensible.
CSRF, Views, and OAuth
For protection against cyberattacks such as Cross-Site Request Forgery (CSRF), Tempest replaces the classic token approach with the headers Sec-Fetch-Site and Sec-Fetch-Mode. The previous x-csrf element is omitted.
The view parser now passes whitespace unchanged, which is intended to facilitate debugging. In addition, Tempest supports validation rules with Closures and extends OAuth integration with Twitch.
Upgrade and Outlook
As a major release, Tempest 3.0 brings several breaking changes, for example in exception handling, session management, and configuration classes. An upgrader based on Rector is intended to partially automate the migration of existing projects.
For the 3.x series, the team plans, among other things, a debugging AI, support for FrankenPHP's worker mode, and a revision of the event and command bus. Further information about the release can be found in the announcement post on the official website for the PHP framework.
(mdo)