Skip to content

Commit 3786fd1

Browse files
committed
🔀 Merge branch 'main' into feat/auth/oauth-sso
2 parents 19cb95b + 0f7fc94 commit 3786fd1

File tree

67 files changed

+8677
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+8677
-68
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy documentation
2+
on:
3+
push:
4+
paths:
5+
- "docs/**"
6+
branches:
7+
- main
8+
- 2.x
9+
10+
jobs:
11+
trigger:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Trigger documentation deployment
15+
uses: diekotto/repository-dispatch@v1
16+
with:
17+
token: ${{ secrets.DOCS_DEPLOY_TRIGGER_PAT }}
18+
repository: tempestphp/tempest-docs
19+
event-type: deploy

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Integration Tests
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- ".github/**"
58
workflow_dispatch:
69
schedule:
710
- cron: "0 0 * * *"

.github/workflows/isolated-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Isolated tests
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- ".github/**"
58
workflow_dispatch:
69
schedule:
710
- cron: "0 0 * * *"

.github/workflows/trigger-tempest-app-qa.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Trigger tempest/app QA
33
on:
44
push:
55
branches: [main]
6+
paths-ignore:
7+
- "docs/**"
8+
- ".github/**"
69

710
jobs:
811
trigger:

.github/workflows/trigger-tempest-clean-qa.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Trigger tempest/clean QA
33
on:
44
push:
55
branches: [main]
6+
paths-ignore:
7+
- "docs/**"
8+
- ".github/**"
69

710
jobs:
811
trigger:

.github/workflows/validate-packages.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
name: Validate Packages
1+
name: Validate packages
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- ".github/**"
58
workflow_dispatch:
69

710
jobs:

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,33 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [1.5.1](https://github.com/tempestphp/tempest-framework/compare/v1.5.0..1.5.1) — 2025-07-29
5+
## [1.6.0](https://github.com/tempestphp/tempest-framework/compare/v1.5.1..1.6.0) — 2025-08-08
6+
7+
### 🚀 Features
8+
9+
- **core**: improved exceptions for unwriteable internal storage (#1468) ([948f800](https://github.com/tempestphp/tempest-framework/commit/948f8003b689488761cd3f160f6d2fdb78059a46))
10+
- **cryptography**: introduce cryptography component (#1346) ([439b49e](https://github.com/tempestphp/tempest-framework/commit/439b49eabecdbf2e65b4a652f5e9140189bcece6))
11+
- **database**: add `string` method on `CreateTableStatement` (#1454) ([9c78fd6](https://github.com/tempestphp/tempest-framework/commit/9c78fd645a55d5e8a309fc2b12e4968b0f1609f6))
12+
- **datetime**: add convenience comparison and manipulation methods (#1450) ([4aab9ed](https://github.com/tempestphp/tempest-framework/commit/4aab9ed744ce0aac02a7f657acb55de76a340ca9))
13+
- **http**: offer more control over server sent events format (#1459) ([6623850](https://github.com/tempestphp/tempest-framework/commit/6623850b1a90574fe782d5a351f0999ed07fa747))
14+
- **mapper**: implement serialization mapping for DTOs (#1449) ([900898a](https://github.com/tempestphp/tempest-framework/commit/900898a05113d0c7629cbdb9f72896d5edfead48))
15+
- **testing**: add assert response json assertions (#1433) ([754a657](https://github.com/tempestphp/tempest-framework/commit/754a65734a4cf1bfecebbf0cc8194d80aac66c8c))
16+
- **vite**: support passing configuration to containerized environments (#1426) ([acace86](https://github.com/tempestphp/tempest-framework/commit/acace86ee39afefd81a4199f6c50831601d71624))
17+
18+
### 🐛 Bug fixes
19+
20+
- **router**: do not discover controller stub (#1453) ([2246f72](https://github.com/tempestphp/tempest-framework/commit/2246f7250d3e187f8f0f105aeba90badbace308c))
21+
- **view**: set doctype in `x-base` (#1451) ([e7ea095](https://github.com/tempestphp/tempest-framework/commit/e7ea095574940fb36242a906eaa42698b016652d))
22+
- **view**: pass scoped variables down view components (#1467) ([c911989](https://github.com/tempestphp/tempest-framework/commit/c911989bbfd04b4238fc74a742bd6c44e84d6345))
23+
- add json-serializable to `TestResponseHelper` $body (#1455) ([3d459fd](https://github.com/tempestphp/tempest-framework/commit/3d459fdb885c46d44419cadca47760c0870fa02b))
24+
25+
### 🧪 Tests
26+
27+
- **cache**: skip redis cache tests when connection fails (#1457) ([cf504ad](https://github.com/tempestphp/tempest-framework/commit/cf504ad0e1d10b81a9f0a45d036107a92aa20120))
28+
- reduce flakiness of time sensitive tests (#1460) ([167d3f5](https://github.com/tempestphp/tempest-framework/commit/167d3f5ef71a5366e20e7e62224085c6f0659a25))
29+
30+
31+
## [1.5.1](https://github.com/tempestphp/tempest-framework/compare/v1.5.0..v1.5.1) — 2025-07-29
632

733
### 🚀 Features
834

bun.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
"workspaces": {
44
"": {
55
"devDependencies": {
6-
"@types/bun": "1.2.19",
7-
"bumpp": "10.2.1",
8-
"dprint": "0.50.1",
9-
"typescript": "5.8.3",
6+
"@types/bun": "latest",
7+
"bumpp": "^10.0.1",
8+
"dprint": "^0.50.0",
9+
"typescript": "^5.7.3",
1010
"unbuild": "^3.3.1",
1111
"vite-plugin-tempest": "workspace:*",
12-
"vitest": "3.2.4",
12+
"vitest": "^3.2.3",
1313
},
1414
},
1515
"packages/vite-plugin-tempest": {
1616
"name": "vite-plugin-tempest",
17-
"version": "1.5.0",
17+
"version": "1.6.0",
1818
"dependencies": {
1919
"@innocenzi/utils": "^0.3.0",
2020
"picocolors": "^1.1.1",
@@ -192,7 +192,7 @@
192192

193193
"@trysound/sax": ["@trysound/[email protected]", "", {}, "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA=="],
194194

195-
"@types/bun": ["@types/[email protected].19", "", { "dependencies": { "bun-types": "1.2.19" } }, "sha512-d9ZCmrH3CJ2uYKXQIUuZ/pUnTqIvLDS0SK7pFmbx8ma+ziH/FRMoAq5bYpRG7y+w1gl+HgyNZbtqgMq4W4e2Lg=="],
195+
"@types/bun": ["@types/[email protected].20", "", { "dependencies": { "bun-types": "1.2.20" } }, "sha512-dX3RGzQ8+KgmMw7CsW4xT5ITBSCrSbfHc36SNT31EOUg/LA9JWq0VDdEXDRSe1InVWpd2yLUM1FUF/kEOyTzYA=="],
196196

197197
"@types/chai": ["@types/[email protected]", "", { "dependencies": { "@types/deep-eql": "*" } }, "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg=="],
198198

@@ -236,7 +236,7 @@
236236

237237
"bumpp": ["[email protected]", "", { "dependencies": { "ansis": "^4.1.0", "args-tokenizer": "^0.3.0", "c12": "^3.1.0", "cac": "^6.7.14", "escalade": "^3.2.0", "jsonc-parser": "^3.3.1", "package-manager-detector": "^1.3.0", "semver": "^7.7.2", "tinyexec": "^1.0.1", "tinyglobby": "^0.2.14", "yaml": "^2.8.0" }, "bin": { "bumpp": "bin/bumpp.mjs" } }, "sha512-Dhgao1WhrcMg+1R3GU+57e6grUNNIGORN53YllDFurNEVGWmkD/z63R3xX4Sl9IqEw//1/UxbrvmK8V1pcJDHw=="],
238238

239-
"bun-types": ["[email protected].19", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-uAOTaZSPuYsWIXRpj7o56Let0g/wjihKCkeRqUBhlLVM/Bt+Fj9xTo+LhC1OV1XDaGkz4hNC80et5xgy+9KTHQ=="],
239+
"bun-types": ["[email protected].20", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-pxTnQYOrKvdOwyiyd/7sMt9yFOenN004Y6O4lCcCUoKVej48FS5cvTw9geRaEcB9TsDZaJKAxPTVvi8tFsVuXA=="],
240240

241241
"c12": ["[email protected]", "", { "dependencies": { "chokidar": "^4.0.3", "confbox": "^0.2.2", "defu": "^6.1.4", "dotenv": "^16.6.1", "exsolve": "^1.0.7", "giget": "^2.0.0", "jiti": "^2.4.2", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^1.0.0", "pkg-types": "^2.2.0", "rc9": "^2.1.2" }, "peerDependencies": { "magicast": "^0.3.5" }, "optionalPeers": ["magicast"] }, "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw=="],
242242

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
title: Introduction
3+
description: "Tempest is a framework for PHP development, designed to get out of your way. Its core philosophy is to help you focus on your application code, without being bothered hand-holding the framework."
4+
---
5+
6+
Tempest's goal is to make you more productive when building web and console apps in PHP. It handles all the boilerplate parts of such projects for you, so that you can focus on what matters the most: writing application code.
7+
8+
People using Tempest say it's the sweet spot between the robustness of Symfony and the eloquence of Laravel. It feels lightweight and close to vanilla PHP; and yet powerful and feature-rich. On this page, you'll read what sets Tempest apart as a framework for modern PHP development. If you're already convinced, you can head over to the [installation page](../0-getting-started/02-installation.md) and get started with Tempest.
9+
10+
## Vision
11+
12+
Tempest's vision can be summarized like this: **it's a community-driven, modern PHP framework that gets out of your way and dares to think outside the box**. Let's dissect that vision in depth.
13+
14+
### Community driven
15+
16+
Tempest started out as an educational project, without the intention for it to be something real. People picked up on it, though, and it was only after a strong community had formed that we considered making it something real.
17+
18+
Currently, there are three core members dedicating a lot of their time to Tempest, as well as over [50 additional contributors](https://github.com/tempestphp/tempest-framework). We have an active [Discord server](/discord) with close to 400 members.
19+
20+
Tempest isn't a solo project and never has been. It is a new framework and has a way to go compared to Symfony or Laravel, but there already is significant momentum and will only keep growing.
21+
22+
### Embracing modern PHP
23+
24+
The benefit of starting from scratch like Tempest did is having a clean slate. Tempest embraced modern PHP features from the start, and its goal is to keep doing this in the future by shipping built-in upgraders whenever breaking changes happen (think of it as Laravel Shift, but built into the framework).
25+
26+
Just to name a couple of examples, Tempest uses property hooks:
27+
28+
```php
29+
interface DatabaseMigration
30+
{
31+
public string $name {
32+
get;
33+
}
34+
35+
public function up(): ?QueryStatement;
36+
37+
public function down(): ?QueryStatement;
38+
}
39+
```
40+
41+
Attributes:
42+
43+
```php
44+
final class BookController
45+
{
46+
#[Get('/books/{book}')]
47+
public function show(Book $book): Response { /* … */ }
48+
}
49+
```
50+
51+
Proxy objects:
52+
53+
```php
54+
use Tempest\Container\Proxy;
55+
56+
final readonly class BookController
57+
{
58+
public function __construct(
59+
#[Proxy] private SlowDependency $slowDependency,
60+
) { /* … */ }
61+
}
62+
```
63+
64+
And a lot more.
65+
66+
### Getting out of your way
67+
68+
A core part of Tempest's philosophy is that it wants to "get out of your way" as best as possible. For starters, Tempest is designed to structure your project code however you want, without making any assumptions or forcing conventions on you. You can prefer a classic MVC application, DDD or hexagonal design, microservices, or something else; Tempest works with any project structure out of the box without any configuration.
69+
70+
Behind Tempest's flexibility is one of its most powerful features: [discovery](../internals/discovery). Discovery gives Tempest a great number of insights into your codebase, without any handholding. Discovery handles routing, console commands, view components, event listeners, command handlers, middleware, schedules, migrations, and more.
71+
72+
```php
73+
final class ConsoleCommandDiscovery implements Discovery
74+
{
75+
use IsDiscovery;
76+
77+
public function __construct(
78+
private readonly ConsoleConfig $consoleConfig,
79+
) {}
80+
81+
public function discover(DiscoveryLocation $location, ClassReflector $class): void
82+
{
83+
foreach ($class->getPublicMethods() as $method) {
84+
if ($consoleCommand = $method->getAttribute(ConsoleCommand::class)) {
85+
$this->discoveryItems->add($location, [$method, $consoleCommand]);
86+
}
87+
}
88+
}
89+
90+
public function apply(): void
91+
{
92+
foreach ($this->discoveryItems as [$method, $consoleCommand]) {
93+
$this->consoleConfig->addCommand($method, $consoleCommand);
94+
}
95+
}
96+
}
97+
```
98+
99+
Discovery makes Tempest truly understand your codebase so that you don't have to explain the framework how to use it. Of course, discovery is heavily optimized for local development and entirely cached in production, so there's no performance overhead. Even better: discovery isn't just a core framework feature, you're encouraged to write your own project-specific discovery classes wherever they make sense. That's the Tempest way.
100+
101+
Besides Discovery, Tempest is designed to be extensible. You'll find that any part of the framework can be replaced and hooked into by implementing an interface and plugging it into the container. No fighting the framework, Tempest gets out of your way.
102+
103+
```php
104+
use Tempest\View\ViewRenderer;
105+
106+
$container->singleton(ViewRenderer::class, $myCustomViewRenderer);
107+
```
108+
109+
### Thinking outside the box
110+
111+
Finally, since Tempest originated as an educational project, many Tempest features dare to rethink the things we've gotten used to. For example, [console commands](../1-essentials/04-console-commands), which in Tempest are designed to be very similar to controller actions:
112+
113+
```php
114+
final readonly class BooksCommand
115+
{
116+
use HasConsole;
117+
118+
public function __construct(
119+
private BookRepository $repository,
120+
) {}
121+
122+
#[ConsoleCommand]
123+
public function find(?string $initial = null): void
124+
{
125+
$book = $this->search(
126+
'Find your book',
127+
$this->repository->find(...),
128+
);
129+
}
130+
131+
#[ConsoleCommand(middleware: [CautionMiddleware::class])]
132+
public function delete(string $title, bool $verbose = false): void
133+
{ /* … */ }
134+
}
135+
```
136+
137+
Or what about [Tempest's ORM](../1-essentials/03-database), which aims to have truly decoupled models:
138+
139+
```php
140+
use Tempest\Validation\Rules\Length;
141+
use App\Author;
142+
143+
final class Book
144+
{
145+
#[Length(min: 1, max: 120)]
146+
public string $title;
147+
148+
public ?Author $author = null;
149+
150+
/** @var \App\Chapter[] */
151+
public array $chapters = [];
152+
}
153+
```
154+
155+
```php
156+
final class BookRepository
157+
{
158+
public function findById(int $id): Book
159+
{
160+
return query(Book::class)
161+
->select()
162+
->with('chapters', 'author')
163+
->where('id = ?', $id)
164+
->first();
165+
}
166+
}
167+
```
168+
169+
Then there's our view engine, which embraces the most original template engine of all time: HTML;
170+
171+
```html
172+
<x-base :title="$this->seo->title">
173+
<ul>
174+
<li :foreach="$this->books as $book">
175+
{{ $book->title }}
176+
177+
<span :if="$this->showDate($book)">
178+
<x-tag>
179+
{{ $book->publishedAt }}
180+
</x-tag>
181+
</span>
182+
</li>
183+
</ul>
184+
</x-base>
185+
```
186+
187+
## Getting started
188+
189+
Are you intrigued? Want to give Tempest a try? Head over to [the next chapter](../0-getting-started/02-installation.md) to learn about how to get started with Tempest.
190+
191+
If you want to become part of our community, you're more than welcome to [join our Discord server](/discord), and to check out [Tempest on GitHub](https://github.com/tempestphp/tempest-framework).
192+
193+
Enjoy!

0 commit comments

Comments
 (0)