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
{{ message }}
Repository navigation
Commit 558be40
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/book/v7/introduction/introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
## Summary
4
4
5
-
A tour of Dotkernel API: a PSR-15 middleware REST framework on PHP 8.2+ acting as a Headless Platform, with OAuth2 authentication, RBAC authorization, content negotiation, Doctrine ORM persistence, HAL payloads, CORS handling, email through `dot-mail`, OpenAPI and Bruno documentation, per-module routing and configuration, CLI commands with a file locker, and unit and functional test suites — closing with the pitfalls to avoid and where to go next.
5
+
A tour of Dotkernel API: a PSR-15 middleware REST framework on PHP 8.3+ acting as a Headless Platform, with OAuth2 authentication, RBAC authorization, content negotiation, Doctrine ORM persistence, HAL payloads, CORS handling, email through `dot-mail`, OpenAPI and Bruno documentation, per-module routing and configuration, CLI commands with a file locker, and unit and functional test suites — closing with the pitfalls to avoid and where to go next.
6
6
7
7
## What is Dotkernel API?
8
8
9
-
Dotkernel API is a modern, PSR-15 middleware-based REST API framework built on PHP 8.2+.
9
+
Dotkernel API is a modern, PSR-15 middleware-based REST API framework built on PHP 8.3+.
10
10
It is a Headless Platform with built-in OAuth2 authentication, RBAC authorization, and content negotiation.
Copy file name to clipboardExpand all lines: docs/book/v7/introduction/server-requirements.md
+54-18Lines changed: 54 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Summary
4
4
5
-
What Dotkernel API v7 needs to run: a Linux host in production (Windows via WSL2 for development), Apache with `mod_rewrite` or an Nginx equivalent, PHP 8.2 or newer with `mbstring` and CLI SAPI, Composer 2.0 or newer, and MariaDB or PostgreSQL — MySQL is not supported because it lacks native UUID types.
5
+
What Dotkernel API v7 needs to run: a Linux host in production (Windows via WSL2 for development), Apache with `mod_rewrite` or an Nginx equivalent, PHP 8.3, 8.4 or 8.5 with the `gd`, `json` and `mbstring` extensions and CLI SAPI, Composer 2.0 or newer, and MariaDB or PostgreSQL — MySQL is not supported because it lacks native UUID types.
6
6
Recommended extensions and baseline server hardening are listed as well.
7
7
8
8
## Details
@@ -38,33 +38,64 @@ Windows is supported for development via WSL2.
38
38
39
39
You need to convert the provided Apache related `.htaccess` file into Nginx configuration instructions.
40
40
41
-
## PHP >= 8.2
41
+
## PHP 8.3, 8.4 or 8.5
42
+
43
+
Dotkernel API v7 requires PHP 8.3, 8.4 or 8.5, as declared in `composer.json`:
44
+
45
+
```json
46
+
"require": {
47
+
"php": "~8.3.0 || ~8.4.0 || ~8.5.0"
48
+
}
49
+
```
42
50
43
-
Dotkernel API v7 requires PHP 8.2 or higher.
44
51
Earlier PHP versions are not supported.
52
+
Support for PHP 8.2 was dropped in Dotkernel API 7.2.0.
53
+
54
+
> The constraint uses `~` per minor version rather than `>=`, so each supported branch is listed
55
+
> explicitly and a newly released PHP version is not assumed to work until it has been tested.
45
56
46
57
### Supported PHP Configurations
47
58
48
59
- FPM (FastCGI Process Manager) - Recommended for production, better performance and security isolation
49
60
- FastCGI - Obsolete but still in use by some hosting providers
50
61
- CLI SAPI (Command Line Interface) - Required for Cron jobs, migrations, and fixtures
51
62
52
-
### Why PHP 8.2+?
63
+
### Why PHP 8.3+?
64
+
65
+
The floor is set by **typed class constants**, a PHP 8.3 feature used throughout the codebase — for
66
+
example in `Api\App\Middleware\ContentNegotiationMiddleware`:
67
+
68
+
```php
69
+
public const string DEFAULT_HEADERS = 'default';
70
+
```
71
+
72
+
The project will not even parse on PHP 8.2.
53
73
54
-
Dotkernel API leverages modern PHP features:
74
+
Beyond that, Dotkernel API leverages these modern PHP features:
55
75
56
-
- Named Arguments: Clearer function calls
57
-
- Match Expressions: More readable than switch statements
58
-
- Attributes: Metadata for dependency injection and OpenAPI documentation
59
-
- Union Types: Better type safety
60
-
- Nullsafe Operator: Safer null handling
61
-
- Constructor Property Promotion: Cleaner code
76
+
- Typed Class Constants (8.3): Constants carry a declared type
77
+
- Readonly Classes (8.2): Immutable value objects such as the deprecation attributes
78
+
- Enums (8.1): Roles and statuses are backed enums rather than class constants
79
+
- Attributes (8.0): Metadata for dependency injection and OpenAPI documentation
80
+
- Named Arguments (8.0): Clearer function calls, used when creating problem-details exceptions
81
+
- Match Expressions (8.0): More readable than switch statements
- Union Types (8.0) and the Nullsafe Operator (8.0): Better type safety and safer null handling
62
84
63
85
## Required Settings and Modules & Extensions
64
86
87
+
These extensions are declared in the `require` section of `composer.json` as `ext-gd` and
88
+
`ext-json`, so Composer refuses to install the project without them:
89
+
90
+
-`gd` - must be enabled; this is the one to check on a new server
91
+
-`json` - ships enabled and cannot be disabled on any supported PHP version, so in practice it needs no action
92
+
93
+
Also required:
94
+
95
+
- mbstring
96
+
- the PDO driver for your database - `pdo_mysql` for MariaDB or `pdo_pgsql` for PostgreSQL
65
97
- memory_limit >= 128M
66
98
- upload_max_filesize and post_max_size >= 100 M (depending on your data)
67
-
- mbstring
68
99
- CLI SAPI (for Cron Jobs)
69
100
- Composer (added to $PATH)
70
101
@@ -99,11 +130,13 @@ When creating databases, use:
99
130
100
131
## Recommended extensions
101
132
133
+
These are optional and depend on what your application does.
134
+
For the extensions the project itself requires, see the "Required Settings and Modules & Extensions" section above.
135
+
102
136
-`opcache`
103
-
-`pdo_mysql`, `pdo_pgsql` or `mysqli` (if using MariaDB or PostgreSQL as RDBMS)
104
137
-`dom` - if working with markup files structure (HTML, XML, etc.)
105
138
-`simplexml` - working with XML files
106
-
-`gd`, `exif` - if working with images
139
+
-`exif` - additional image metadata handling (`gd` itself is required, not optional)
107
140
-`zlib`, `zip`, `bz2` - if compressing files
108
141
-`curl` (required if APIs are used)
109
142
-`sqlite3` - for tests
@@ -138,8 +171,10 @@ A: `utf8mb4_general_ci` or `utf8mb4_unicode_ci` on MariaDB, and `C.UTF-8` or `en
138
171
139
172
**Q: What is the minimum PHP version?**
140
173
141
-
A: PHP 8.2.
142
-
Earlier versions are not supported, because the project relies on named arguments, match expressions, attributes, union types, the nullsafe operator and constructor property promotion.
174
+
A: PHP 8.3.
175
+
`composer.json` requires `~8.3.0 || ~8.4.0 || ~8.5.0`, so 8.3, 8.4 and 8.5 are supported and earlier versions are not.
176
+
PHP 8.2 support was dropped in Dotkernel API 7.2.0.
177
+
The hard blocker is typed class constants, a PHP 8.3 feature used throughout the codebase, so the project will not parse on 8.2.
143
178
144
179
**Q: Do I need the CLI SAPI as well as FPM?**
145
180
@@ -156,8 +191,9 @@ A: Yes, through WSL2. macOS and Linux are also supported for development; produc
156
191
157
192
**Q: Which PHP extensions are actually required?**
158
193
159
-
A: `mbstring` plus the PDO driver for your database.
160
-
The rest — `opcache`, `gd`, `curl`, `zip`, `dom`, `simplexml`, `sqlite3` and others — depend on what your application does, with `sqlite3` needed to run the tests.
194
+
A: `gd` and `json` are declared in `composer.json` as `ext-gd` and `ext-json`, so Composer will not install the project without them.
195
+
Add `mbstring` and the PDO driver for your database — `pdo_mysql` or `pdo_pgsql`.
196
+
The rest — `opcache`, `curl`, `zip`, `dom`, `simplexml`, `exif`, `sqlite3` and others — depend on what your application does, with `sqlite3` needed to run the tests.
0 commit comments