diff --git a/public/admin.md b/public/admin.md index d06c975..1f78bba 100644 --- a/public/admin.md +++ b/public/admin.md @@ -16,6 +16,8 @@ A fast, reliable way to manage the records in your database with a simple table- - [View on GitHub](https://github.com/dotkernel/admin) - [Live demo](https://admin7.dotkernel.net/) +PHP 8.3, 8.4 or 8.5 . [Latest release](https://github.com/dotkernel/admin/releases/latest) + | | | | --- | --- | | Runtime | Mezzio + Laminas | @@ -210,7 +212,7 @@ If the fixtures ran, sign in with user `admin` and password `dotadmin` - the sam | Operating system | A \*nix based system is strongly recommended for production. | | PHP | 8.3 or newer, mod_php or FCGI (FPM). `memory_limit` at least 128M; `upload_max_filesize` and `post_max_size` at least 100M depending on your data. | | Web server | Apache 2.2+ with `mod_rewrite` and `.htaccess` support (`AllowOverride All`) - a default `.htaccess` ships in `public/`. On Nginx, translate it into server configuration. | -| Database | MariaDB 10.7, 10.11 LTS, 11.4 LTS and 11.8 LTS, or PostgreSQL 13 and above. **MySQL is not supported**, as it has no UUID support. | +| Database | MariaDB 11.4 LTS, 11.8 LTS and 12.3 LTS, or PostgreSQL 13 and above. **MySQL is not supported**, as it has no UUID support. | | Required extensions | `mbstring`, the CLI SAPI for cron jobs, and Composer available on `$PATH`. | | Recommended extensions | `opcache`; `pdo_mysql`, `pdo_pgsql` or `mysqli` to match your database; `dom` and `simplexml` for markup; `gd` and `exif` for images; `zlib`, `zip`, `bz2` for compression; `curl` when calling APIs; `sqlite3` for the test suite. | diff --git a/public/api.md b/public/api.md index 31d0cda..3886a4f 100644 --- a/public/api.md +++ b/public/api.md @@ -16,6 +16,8 @@ OAuth 2.0, RBAC authorization, HAL payloads, standardized error responses and an - [View on GitHub](https://github.com/dotkernel/api) - [Live demo](https://api.dotkernel.net/) +PHP 8.3, 8.4 or 8.5 . [Latest release](https://github.com/dotkernel/api/releases/latest) + | | | | --- | --- | | Runtime | Mezzio + Laminas | @@ -130,11 +132,11 @@ You keep full control of the UUID version without depending on database extensio ### PostgreSQL support PostgreSQL joins the supported databases. -Because native UUID is required, you need PostgreSQL or MariaDB 10.7 or later; MySQL is no longer supported, as it has no UUID data type. +Because native UUID is required, you need PostgreSQL 13+ or MariaDB 11.4 or later; MySQL is no longer supported, as it has no UUID data type. ### PHP 8.5 -The API targets PHP 8.5, with Dotkernel Admin on 8.4. +The API and Admin target PHP 8.5. Dependencies are kept current, and the ecosystem's own packages track the versions Laminas and Doctrine support. ### Table prefixes @@ -176,7 +178,7 @@ The comparison below is drawn from the full side-by-side write-up on our blog. | First release | 2012 | 2018 | | Architecture | MVC, event driven | Middleware | | OSS lifecycle | Archived | Active | -| PHP version | ≤ 8.2 | See the PHP version badge for `dotkernel/api` | +| PHP version | ≤ 8.2 | 8.3, 8.4 or 8.5 | | Style | REST, RPC | REST | | Change management | Versioning | Deprecations (API evolution) | | Documentation | Swagger (automated) | OpenAPI 3.0 (Swagger) and Postman (manual) | @@ -283,7 +285,7 @@ Updates arrive with bugfixes and improvements from the PHP community, and breaki ## Install it and call an endpoint -Create the project with Composer, point it at PostgreSQL or MariaDB 10.7+, run the migrations, and you have an authenticated REST API with a browsable OpenAPI specification. +Create the project with Composer, point it at PostgreSQL 13+ or MariaDB 11.4+, run the migrations, and you have an authenticated REST API with a browsable OpenAPI specification. - [Installation guide](https://docs.dotkernel.org/api-documentation/) - [Try the demo](https://api.dotkernel.net/) diff --git a/public/architecture.md b/public/architecture.md index 6cac3ab..6d98ad1 100644 --- a/public/architecture.md +++ b/public/architecture.md @@ -22,7 +22,7 @@ A request enters at the error boundary, passes through routing, negotiation, aut | Container | PSR-11 | | Logging | PSR-3 | -## Five phases, 19 stages +## Six phases, 19 stages Error boundary (1 stage) -> Request preparation (4 stages) -> Routing (4 stages) -> Contract & headers (4 stages) -> Identity (2 stages) -> Dispatch & fallback (4 stages). diff --git a/public/frontend.md b/public/frontend.md index 99c5880..53b88f2 100644 --- a/public/frontend.md +++ b/public/frontend.md @@ -221,7 +221,7 @@ Duplicating `local.test.php.dist` gives your tests an in-memory database. | Required extensions | `curl`, `gettext`, `intl`, `json`, `mbstring`, the CLI SAPI for cron jobs, and Composer on `$PATH`. | | Recommended extensions | `opcache`; `pdo_mysql` for MySQL or MariaDB; `dom` and `simplexml` for markup; `gd` and `exif` for images; `zlib`, `zip`, `bz2` for compression; `sqlite3` for the test suite. | -Note that Frontend still supports MySQL - unlike API and Admin v7, which require native UUID support and therefore PostgreSQL or MariaDB 10.7+. +Note that Frontend still supports MySQL - unlike API and Admin v7, which require native UUID support and therefore PostgreSQL 13+ or MariaDB 11.4+. ## Where Frontend sits diff --git a/public/queue.md b/public/queue.md index a82ac48..b47fbfe 100644 --- a/public/queue.md +++ b/public/queue.md @@ -201,7 +201,7 @@ valkey-cli ping ### 4 . Clone and configure -Clone the queue branch, then copy each `.dist` configuration file into place - local, log, messenger and swoole - and fill them in. +Clone the queue repo, then copy each `.dist` configuration file into place - local, log, messenger and swoole - and fill them in. ```shell git clone https://github.com/dotkernel/queue.git diff --git a/src/App/templates/layout/default.html.twig b/src/App/templates/layout/default.html.twig index 112286c..a4075a5 100644 --- a/src/App/templates/layout/default.html.twig +++ b/src/App/templates/layout/default.html.twig @@ -53,6 +53,7 @@
memory_limit at least 128M;
+ memory_limit at least 128M;
upload_max_filesize and post_max_size at least 100M depending
on your data.The API and Admin target PHP 8.5. Dependencies are kept current, and the +
The API targets PHP 8.5, with Dotkernel Admin on 8.4. Dependencies are kept current, and the ecosystem's own packages track the versions Laminas and Doctrine support.
User accounts, from register to unregister
+User accounts, from registration to account deletion
The whole account lifecycle, already routed.
- Login, registration and account management, including avatar upload, password change and - unregistering. Password reset and account activation emails are part of the flow, which is why - the skeleton stores a name and an email address and nothing more. + Login, registration and account management, including activation, password reset, avatar upload, + profile details, password change and account deletion. Password reset and account activation + emails are part of the flow, which is why the only personal details on a user profile are a name + and an email address.
A public form that does not become a spam relay.
- The contact form uses Google reCAPTCHA, with the site and secret keys read from local
- configuration and the message recipients - to and any number of
- cc addresses - configured alongside them. Whitelist localhost while
- developing, and take it out again for production.
+ The contact form uses score-based Google reCAPTCHA, with the site key, secret key and score
+ threshold read from local configuration, and the message recipients - to,
+ cc and bcc addresses - configured alongside them. The contact page will
+ not render until the keys are set; whitelist localhost while developing, and take it
+ out again for production.
Response headers declared per route.
+Response headers declared globally or per route.
- dot-response-header sets custom headers per route from
+ dot-response-header sets custom headers for all routes or for individual routes from
response-header.global.php, while mezzio-cors handles origins, headers
and cookies from cors.global.php.
- The skeleton stores only what it needs to run those flows: first name, last name and the email - address used as the identity, for password reset and account activation. Anonymizing replaces - exactly those. + On the user profile, the skeleton stores only what it needs to run those flows: first name, last + name and the email address used as the identity, for password reset and account activation. + Anonymizing replaces exactly those; contact form messages and remember-me records are kept as they + are.
anonymous plus the current UNIX timestamp - for example
- anonymous1725980747.anonymous plus the current date and time in
+ dmYHis format - for example anonymous23092026155300.userAnonymizeAppend -
- anonymous1725980747@example.com.anonymous23092026155300@example.com.
+ deleted; the row itself is kept.
Point userAnonymizeAppend at a domain you control and it doubles as a catch-all
@@ -389,8 +393,9 @@
Controller, Entity, Repository and
- Service folders, plus InputFilter, EventListener,
- Helper, Command or Factory as needed.
Service folders, plus Form, Fieldset,
+ InputFilter, EventListener, Factory,
+ Middleware or Enum as needed.
Copy the .dist files into place - local.php,
- development.local.php, mail.local.php,
- debugbar.local.php - then fill in the database, SMTP and reCAPTCHA details.
composer install has already created local.php and
+ mail.global.php, and development mode created development.local.php;
+ fill in the database and reCAPTCHA details in local.php, and copy
+ mail.global.php to mail.local.php for the sender and SMTP details, so
+ credentials stay out of git.
memory_limit at least 128M;
+ memory_limit at least 128M;
upload_max_filesize and post_max_size at least 100M depending
on your data.mbstring, the CLI SAPI for cron jobs, and Composer on
+ curl, gettext, intl, json,
+ mbstring, the CLI SAPI for cron jobs, and Composer on
$PATH.opcache; pdo_mysql or mysqli;
+ opcache; pdo_mysql for MySQL or MariaDB;
dom and simplexml for markup; gd and
exif for images; zlib, zip,
- bz2 for compression; curl when calling APIs;
- sqlite3 for the test suite.bz2 for compression; sqlite3 for the test suite.
Vite concatenates and compresses CSS and JavaScript, preprocesses SCSS, and copies fonts and
images - avoiding the network bottleneck of many separate files. npm run watch
- recompiles on change; npm run build compiles once. Node.js v20 is the minimum
- supported version.
+ recompiles on change; npm run build compiles once. Node.js ^20.19.0
+ or >=22.12.0 is required.
No database to create, no fixtures to seed. Clone, install, set a URL, open it.
+No database to create, no fixtures to seed. Create the project, set a URL, open it.
Git refuses a directory that is not empty, and you need write permissions on it.
-git clone https://github.com/dotkernel/light.git .
+ One Composer command creates the directory, installs dependencies, and enables development mode + for you. Decline the config provider injection when prompted - Light already includes its + own.
+composer create-project dotkernel/light dk
cd dk
Run it from the CLI so the prompts stay interactive. Decline the config provider injection - - Light already includes its own.
-composer install
- Local work only. composer development-status reports where you stand.
composer development-enable
- Point $baseUrl in config/autoload/local.php at your virtual host.
The two directories the application writes to. Most first-run errors are this and nothing - else.
-chmod -R 777 ./data ./log
+ else. Give the web server group write access instead of opening the folders to everyone:
+ sudo chown -R "$USER":www-data data log
sudo chmod -R 775 data log
The Dotkernel Light welcome page is waiting. Errors about missing services usually mean a stale config cache.
-php ./bin/clear-config-cache.php
+ composer clear-config-cache
+ Do not run this with sudo - that leaves the regenerated
+ data/cache/config-cache.php owned by root, which the application can no longer rewrite.
A cached data/cache/config-cache.php is loaded regardless of the
ConfigAggregator::ENABLE_CACHE setting - which is exactly why clearing it fixes so much.
On Windows, WSL2 with AlmaLinux is the recommended development environment.
@@ -441,7 +434,7 @@
memory_limit at least
+ memory_limit at least
128M.Clone the queue branch, then copy each .dist configuration file into place - local,
+
Clone the queue repo, then copy each .dist configuration file into place - local,
log, messenger and swoole - and fill them in.
git clone -b default-queue https://github.com/dotkernel/queue.git
composer install --no-dev
+ git clone https://github.com/dotkernel/queue.git
composer install --no-dev
Dotkernel's local environment runs AlmaLinux 10 - inside WSL 2 on Windows, or on bare metal with no WSL at all. One Ansible playbook installs PHP, Apache, MariaDB, Composer, Node.js and @@ -75,7 +76,7 @@
- Everything here also runs the same way without WSL, directly on a bare AlmaLinux 10 host - the
- Ansible playbooks do not know or care which one they are provisioning.
+ Everything from Setup Packages onwards also runs on a bare AlmaLinux 10 host without WSL - the
+ Ansible playbooks do not know or care which one they are provisioning. Connect over SSH, and use
+ the server's IP address instead of localhost when you test it.
Each step runs in a different place - Windows Terminal for the first two, the AlmaLinux 10 shell for - the third. The full walkthrough, prompts and all, is in the docs.
+Steps 1 and 2 run in Windows Terminal and step 3 in the AlmaLinux 10 shell; step 2 ends inside the + new distro with a quick systemd check. The full walkthrough, prompts and all, is in the docs.
Install Windows Terminal, then confirm WSL 2 is enabled - Hyper-V, Virtual Machine Platform and - Windows Subsystem for Linux, all turned on in Windows features.
-wsl -v
+ On Windows 11, install Windows Terminal, then check for a modern WSL 2 install. If
+ wsl --version isn't recognized, install WSL 2 with
+ wsl --install --no-distribution and restart when prompted.
wsl --version
Stop any other running distro, then install AlmaLinux 10 and create your Unix username and password when prompted.
wsl --install -d AlmaLinux-10
+ Before moving on, confirm systemd is active inside AlmaLinux 10 - the playbook needs it. If the
+ check below prints an error instead of a status, add systemd=true under
+ [boot] in /etc/wsl.conf, run wsl --shutdown from Windows
+ Terminal and reopen the distro.
systemctl is-system-running
Clone dotkernel/development, fill in config.yml with your Git identity and MariaDB
- root password, and let Ansible provision the rest.
Inside AlmaLinux 10, update the system, add the EPEL and Remi repositories, and install
+ ansible-core with the community.general and community.mysql
+ collections. Then clone the alma-linux-10 branch of dotkernel/development,
+ copy wsl/config.yml.dist to config.yml, fill in your Git identity and
+ MariaDB root password, and run the playbook from development/wsl.
ansible-playbook -i hosts install.yml --ask-become-pass
Not using WSL? Skip straight to Setup Packages on a bare AlmaLinux 10 host - the same playbook runs
- there unchanged.
+ there unchanged; test it with the server's IP address instead of localhost.
+
+ After setup, + Editor Integration + connects VS Code or PhpStorm, and + WSL Configuration + covers where to keep projects and how to cap WSL's memory and CPU.
php81 … php85 aliases switch
+ php81 … php85 aliases switch
versions.config.yml, and the latest Composer, kept current with
- composer self-update.community.general and community.mysql collections - the same tool that just
- installed itself.config.yml, and the latest Composer at install time; update
+ it later with composer self-update.*.localhost domain is routed automatically.
- List the domains you want under config.yml's virtualhosts key and run the playbook.
+ List the domains you want under config.yml's virtualhosts key and run
+ create-virtualhost.yml - a separate playbook you re-run for every new project, without
+ repeating install.yml.
Existing entries are left untouched, so you keep adding to the same file as your project grows.
In development/wsl/config.yml, under virtualhosts:
api.dotkernel.localhost
+ In development/wsl/config.yml, under config.virtualhosts:
config: + virtualhosts: + - "api.dotkernel.localhost"+
+ api.dotkernel.localhost is only an example - use any name your project needs, such as
+ laravel.localhost or shop.localhost, as long as it ends in
+ .localhost and uses only lowercase letters, numbers and hyphens. Add one list item per
+ project.
+
Then provision it:
ansible-playbook -i hosts create-virtualhost.yml --ask-become-pass
- Files go under /var/www/api.dotkernel.localhost/html, with the document root at
- html/public.
+ Files go under /var/www/<your-domain>/html - for example
+ /var/www/api.dotkernel.localhost/html - with the document root at
+ html/public. html/public doesn't exist until you place a project there,
+ so the URL shows an error until then.
Local development only: chmod -R 777 data, log or
- public/uploads, whichever directory the error names.
public/uploads, whichever directory the error names. Don't carry this into
+ staging or production.
Apache: /var/log/httpd/error_log. PHP-FPM: /var/log/php-fpm/error.log and
- www-error.log.
Apache: /var/log/httpd/error_log, plus
+ /var/www/<virtualhost>/log/error.log for each virtualhost. PHP-FPM:
+ /var/log/php-fpm/error.log and www-error.log.
sudo systemctl restart httpd.
systemd isn't active in the distro yet. Add systemd=true under [boot] in
+ /etc/wsl.conf, run wsl --shutdown from Windows Terminal, reopen
+ AlmaLinux 10 and re-run install.yml.
Find the Windows service holding it with netstat -ano | findstr :80 and stop it, or
+ change Apache's Listen port in /etc/httpd/conf/httpd.conf and restart
+ httpd.
No. It is for local development only: the MariaDB root password is stored in plaintext, + phpMyAdmin allows root login and the firewall is off by default.
+Yes - every instruction here works the same way on a bare AlmaLinux 10 host.
+Yes - from Setup Packages onwards the steps are the same on a bare AlmaLinux 10 host. Skip the
+ WSL steps, connect over SSH, and use the server's IP address instead of
+ localhost.
The WSL 2 + AlmaLinux 10 setup is maintained by the same team behind the rest of the Headless - Platform, so the local environment stays in step with what actually runs in production - not a - Docker approximation of it. + Platform, so the local environment stays on the same OS family as production - not a Docker + approximation of it. It is a local development environment only: security is relaxed by default, + so never expose it to a network.