Skip to content

Commit 558be40

Browse files
committed
Correct PHP version requirement to 8.3+ in v7 docs
composer.json requires ~8.3.0 || ~8.4.0 || ~8.5.0; 8.2 dropped in 7.2.0. Also marks ext-gd and ext-json as required, not recommended.
1 parent 2396a65 commit 558be40

3 files changed

Lines changed: 57 additions & 21 deletions

File tree

‎docs/book/v7/introduction/introduction.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Summary
44

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.
66

77
## What is Dotkernel API?
88

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+.
1010
It is a Headless Platform with built-in OAuth2 authentication, RBAC authorization, and content negotiation.
1111

1212
## When to Use Dotkernel API

‎docs/book/v7/introduction/server-requirements.md‎

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Summary
44

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.
66
Recommended extensions and baseline server hardening are listed as well.
77

88
## Details
@@ -38,33 +38,64 @@ Windows is supported for development via WSL2.
3838

3939
You need to convert the provided Apache related `.htaccess` file into Nginx configuration instructions.
4040

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+
```
4250

43-
Dotkernel API v7 requires PHP 8.2 or higher.
4451
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.
4556
4657
### Supported PHP Configurations
4758

4859
- FPM (FastCGI Process Manager) - Recommended for production, better performance and security isolation
4960
- FastCGI - Obsolete but still in use by some hosting providers
5061
- CLI SAPI (Command Line Interface) - Required for Cron jobs, migrations, and fixtures
5162

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.
5373

54-
Dotkernel API leverages modern PHP features:
74+
Beyond that, Dotkernel API leverages these modern PHP features:
5575

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
82+
- Constructor Property Promotion (8.0): Cleaner code
83+
- Union Types (8.0) and the Nullsafe Operator (8.0): Better type safety and safer null handling
6284

6385
## Required Settings and Modules & Extensions
6486

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
6597
- memory_limit >= 128M
6698
- upload_max_filesize and post_max_size >= 100 M (depending on your data)
67-
- mbstring
6899
- CLI SAPI (for Cron Jobs)
69100
- Composer (added to $PATH)
70101

@@ -99,11 +130,13 @@ When creating databases, use:
99130

100131
## Recommended extensions
101132

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+
102136
- `opcache`
103-
- `pdo_mysql`, `pdo_pgsql` or `mysqli` (if using MariaDB or PostgreSQL as RDBMS)
104137
- `dom` - if working with markup files structure (HTML, XML, etc.)
105138
- `simplexml` - working with XML files
106-
- `gd`, `exif` - if working with images
139+
- `exif` - additional image metadata handling (`gd` itself is required, not optional)
107140
- `zlib`, `zip`, `bz2` - if compressing files
108141
- `curl` (required if APIs are used)
109142
- `sqlite3` - for tests
@@ -138,8 +171,10 @@ A: `utf8mb4_general_ci` or `utf8mb4_unicode_ci` on MariaDB, and `C.UTF-8` or `en
138171

139172
**Q: What is the minimum PHP version?**
140173

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.
143178

144179
**Q: Do I need the CLI SAPI as well as FPM?**
145180

@@ -156,8 +191,9 @@ A: Yes, through WSL2. macOS and Linux are also supported for development; produc
156191

157192
**Q: Which PHP extensions are actually required?**
158193

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.
161197

162198
**Q: What are the baseline hardening steps?**
163199

‎docs/book/v7/transition-from-api-tools/api-tools-vs-dotkernel-api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ API Tools is archived and MVC/event-driven; Dotkernel API is actively maintained
1111
|---------------------|------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
1212
| URL | [api-tools](https://api-tools.getlaminas.org/) | [Dotkernel API](https://www.dotkernel.org) |
1313
| First Release | 2012 | 2018 |
14-
| PHP Version | <= 8.2 | >= 8.2 |
14+
| PHP Version | <= 8.2 | 8.3, 8.4, 8.5 |
1515
| Architecture | MVC, Event Driven | Middleware |
1616
| OSS Lifecycle | Archived | ![OSS Lifecycle](https://img.shields.io/osslifecycle?style=flat&label=&file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fapi%2Fblob%2F7.0%2FOSSMETADATA) |
1717
| Style | REST, RPC | REST |

0 commit comments

Comments
 (0)