You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Web/Blog/articles/2025-05-08-beta-1.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ tag: Release
8
8
9
9
Two years ago, Tempest started out as an educational project during one of my livestreams. Since then, we've had 56 people contribute to the framework, merged 591 pull requests, resolved 455 issues, and have written around 50k lines of code. Two contributors joined the core team and dedicated a lot of their time to help make Tempest into something real. And today, we're tagging Tempest as beta.
10
10
11
-
We have to be real though: we won't get it perfect from the start. Tempest is now in beta, which means we don't plan any breaking changes to stable components anymore, but it also means we expect there to be bugs. And this puts us in an underdog position: why would anyone want to use a framework that has fewer features and likely more bugs than other frameworks?
11
+
We have to be real though: we won't get it perfect from the start. Tempest is now in beta, which means we don't plan any breaking changes to stable components anymore, but it also means we expect there to be bugs. And this puts us in an underdog position: why would anyone want to use a framework that has fewer features and likely more bugs than other frameworks?
12
12
13
13
It turns out, people _do_ see value in Tempest. It's the only reason I decided to work on it in the first place: there is a group of people who _want_ to use it, even when they are aware of its current shortcomings. There is interest in a framework that embraces modern PHP without 10 to 20 years of legacy to carry with it. There is interest in a project that dares to rethink what we've gotten used to over the years. There already is a dedicated community. People already are building with Tempest. Several core members have real use cases for Tempest and are working hard to be able to use it in their own projects as soon as possible. So while Tempest is the underdog, there already seems enough reason for people to use it today.
14
14
@@ -62,7 +62,7 @@ use Tempest\Database\IsDatabaseModel;
62
62
final class Book
63
63
{
64
64
use IsDatabaseModel;
65
-
65
+
66
66
// …
67
67
}
68
68
@@ -97,11 +97,11 @@ $data = query(Book::class)
97
97
->all();
98
98
```
99
99
100
-
We've managed to truly decouple model classes from the persistence layer, while still making them really convenient to use. This is a great example of how Tempest gets out of your way.
100
+
We've managed to truly decouple model classes from the persistence layer, while still making them really convenient to use. This is a great example of how Tempest gets out of your way.
101
101
102
102
An important note to make here is that our ORM is one of the few experimental components within Tempest. We acknowledge that there's more work to be done to make it even better, and there might be some future breaking changes still. It's one of the prime examples where we need the community to help us learn what should be improved, and how.
103
103
104
-
## tempest/view changes
104
+
## `tempest/view` changes
105
105
106
106
We've added support for [dynamic view components](/main/essentials/views#dynamic-view-components), which allows you to render view components based on runtime data:
<!-- <div data-active></div> when $isActive is truthy -->
121
121
```
122
122
123
-
Finally, we switched from PHP's built-in DOM parser to our custom implementation. We realized that trying to parse tempest/view syntax according to the official HTML spec added more problems than it solved. After all, tempest/view syntax is a superset of HTML: it compiles to spec-compliant HTML, but in itself it is not spec-compliant.
123
+
Finally, we switched from PHP's built-in DOM parser to our custom implementation. We realized that trying to parse {`tempest/view`} syntax according to the official HTML spec added more problems than it solved. After all, {`tempest/view`} syntax is a superset of HTML: it compiles to spec-compliant HTML, but in itself it is not spec-compliant.
124
124
125
125
Moving to a custom parser written in PHP comes with a small performance price to pay, but our implementation is slightly more performant than [masterminds/html5](https://github.com/Masterminds/html5-php), the most popular PHP-based DOM parser, and everything our parser does is cached as well. You can [check out the implementation here](https://github.com/tempestphp/tempest-framework/tree/main/packages/view/src/Parser).
126
126
127
127
## Container features
128
128
129
-
We've added a new interface called `HasTag`, which allows any object to manually specify its container tag. This feature is especially useful combined with config files, and allows you to define multiple config files for multiple occasions. For example, to define multiple database connections:
130
-
129
+
We've added a new interface called {b`Tempest\Container\HasTag`}, which allows any object to manually specify its container tag. This feature is especially useful combined with config files, and allows you to define multiple config files for multiple occasions. For example, to define multiple database connections:
131
130
132
131
```php
133
132
return new PostgresConfig(
134
133
tag: 'backup',
135
-
134
+
136
135
// …
137
136
);
138
137
```
@@ -160,7 +159,7 @@ use Tempest\Container\Proxy;
160
159
final readonly class BookController
161
160
{
162
161
public function __construct(
163
-
#[Proxy]
162
+
#[Proxy]
164
163
private VerySlowClass $verySlowClass
165
164
) { /* … */ }
166
165
}
@@ -205,21 +204,21 @@ final readonly class OverviewMiddleware implements ConsoleMiddleware
205
204
206
205
## Smaller features
207
206
208
-
Finishing with a couple of smaller changes, but it's these kinds of small details that make the difference in the long run. So thanks to everyone who contributed:
207
+
Finishing with a couple of smaller changes, but it's these kinds of small details that make the difference in the long run. So thanks to everyone who contributed:
209
208
210
209
- We've added a couple of new commands: `make:migration` and `container:show`
211
-
- We've added testing utilities for our event bus
210
+
- We've added testing utilities for our [event bus](/main/tempest-in-depth/events)
212
211
- There's a new `Back` response class to redirect to the previous page
213
212
- We now allow controllers to also return strings and arrays directly
214
-
- We've added a new storage component, which is a slim wrapper around [Flysystem](https://flysystem.thephpleague.com/docs/)
213
+
- We've added a [new storage component](/main/tempest-in-depth/storage), which is a slim wrapper around [Flysystem](https://flysystem.thephpleague.com/docs/)
215
214
- And, [a lot more](https://github.com/tempestphp/tempest-framework/releases/tag/v1.0.0-beta.1)
216
215
217
216
## In closing
218
217
219
218
It's amazing to see what we've achieved in a little less than two years. Tempest has grown from being a dummy project used during livestreams, to a real framework.
220
219
221
-
There's a long way to go still, but I'm confident when I see how many people are contributing to and excited about Tempest. You can follow along the beta progress on [GitHub](https://github.com/tempestphp/tempest-framework/milestone/16); and you can be part of the journey as well: [give Tempest a try](/main/getting-started/getting-started) and [join our Discord server](https://tempestphp.com/discord).
220
+
There's a long way to go still, but I'm confident when I see how many people are contributing to and excited about Tempest. You can follow along the beta progress on [GitHub](https://github.com/tempestphp/tempest-framework/milestone/16); and you can be part of the journey as well: [give Tempest a try](/main/getting-started/getting-started) and [join our Discord server](https://tempestphp.com/discord).
0 commit comments