Tempest: Php framework

3,335
168
Tempest is a PHP framework designed to stay out of your way, allowing developers to focus more on application logic rather than framework-specific code. Its philosophy is simple: the less you have to interact with the framework itself, the more productive you can be building your application.


Tempest fully embraces modern PHP syntax and offers a rich set of features, including routing, MVC architecture, ORM and database management, console applications, event handling, command buses, logging, and a sleek view engine. It also introduces unique features like discovery to enhance the developer experience.


You can install Tempest either as a standalone PHP project or integrate it as a package within existing applications. Additionally, its modules—such as tempest/console or tempest/event-bus—can be used independently, even alongside other frameworks.


Tempest brings a fresh perspective to familiar patterns, rethinking conventions with innovations like discovery, initializers, and attributes as first-class citizens. With minimal configuration, built-in static pages, and a developing template engine, it aims to streamline development. Alongside expected features like routing, controllers, models, views, and migrations, the framework does have some planned additions, such as built-in authentication, queuing, and mail handling.


Tempest is a work-in-progress according to its developer, but its simplicity and modular design make it a promising tool for developers seeking flexibility without sacrificing modern capabilities.



Their documents to get started on the framework can be found here: Getting Started | Tempest
You can also find its code on Github: GitHub - tempestphp/tempest-framework: The PHP framework that gets out of your way 🌊
 
This looks more promising than starting from scratch...

I wonder how updates would go though.

If I built something atop a framework like this and there was a drastic change, I'd have to fork it just to support my site, which may leave it vulnerable if there are security patches that can't be applied.
 
All of these frameworks... I never knew this stuff even existed.

I would've begun my game from scratch. But, it seems like I need to research a framework to build it on to cut maintenance time.
I started coding before PHP evolved into frameworks. Using a framework makes it so you can code your site faster with a bunch of built-in functions.
 
  • Like
Reactions: WontByte
I started coding before PHP evolved into frameworks. Using a framework makes it so you can code your site faster with a bunch of built-in functions.
Same.

An addition that a framework provides is that you don't need to constantly be on your toes about security. The framework, if you code well on top of it, will take care of that with security patches.
 
  • Like
Reactions: Baw$e
Tempest version 5 has been released:

Besides property hooks, we now also use PHP's new DOM parser for tempest/view, instead replying on third-party userland implementations. Most likely, we'll have to update a lot more 8.4-related tidbits, but the work up until this point has been very productive. Most importantly: all interfaces that should use property hooks now do, which I think is a huge win.

Something we noticed while upgrading to PHP 8.4: the biggest pain point for us isn't PHP itself, it's the QA tools that don't support PHP 8.4 from the get-go: Tempest relies on PHPStan, Rector, and PHP CS Fixer, and all these tools needed at least weeks after the PHP 8.4 release to have support for it. PHP CS Fixer, in fact, currently still doesn't support 8.4: running CS Fixer on an 8.4 codebase results in broken PHP files. PHP 8.4 specific feature support will, most likely, have to wait a lot longer.

Console improvements​

Apart from PHP 8.4, what I'm most excited about in this release are the features that Enzo worked on for weeks on end: he has made a tremendous effort to improve tempest/console, both from the UX side, the styling perspective, and architecturally

tempest/view​

An important part of Tempest's vision is to think outside the box. One of the results of that outside-box-thinking is a new templating engine for PHP. I'm of course biased, but I really like how tempest/view leans much closer to HTML than other PHP templating engines. I would say that tempest/view's goal is to make PHP templating more like HTML — the OG templating language — instead of the other way around.
I've shared the three main highlights of this release, but there have been a lot more features and fixes over the past two months, just to name a few:

  • Guillaume added a bunch of new make: commands
  • static:clean now also clears empty directories
  • Vincent has refactored and simplified route attributes
  • I have done a bunch of small improvements in the database layer
  • Discovery is now a standalone component, thanks to Alex
  • And much more
 
Tempest version 5 has been released:
I'll have to look into this.

One thing that piqued my interest in XF over other template engines is accessibility. Wouldn't it be great to create a game for people with disabilities? The XF template framework has that built in. I would need to examine if Tempest has the same accessibility coding to make it open for disabled users.

A game could surely be "life-changing" in that they could navigate a new world and meet new people without even anyone else on the game knowing the slightest that they're disabled.