Decisions
One decision and the reasoning behind it. Narrower than a proposal: a decision settles a single question rather than proposing how a whole area should work.
Accepted
23 · frozen
ADR-0001
Build the panel as one system
The panel was first built as two systems. A panel held the frontend, and an engine behind it
held everything else. Each lived in its own repository, and the pan...
ADR-0002
Select instances with parameter attributes
The type of a dependency often does not say which instance it needs. Several
implementations or instances can share one interface. A parameter typed against the...
ADR-0003
Seal registries into catalogues
Several parts of the engine collect things while the panel boots and consult them afterwards.
The container collects bindings and resolvers, and the
configurati...
ADR-0004
Do not implement PSR-11
PSR-11 is PHP's shared container interface: get() and has(), each keyed by a string identifier. What it offers is
interchangeability. An application can swap on...
ADR-0005
Hold configuration in typed objects
The engine's components need configuration, and so do modules. The
code that consumes a configuration needs to rely on its shape and on the types of its values.
ADR-0006
Read environment variables only during bootstrap
Some values the panel needs, such as secrets, come from environment variables,
supplied either through the process environment or through a local env file. They...
ADR-0007
Assume MySQL and MariaDB
Obsoleted by ADR-0016, ADR-0023
The engine needs a database component. It is to hold several
connections at once with one of them designated the
primary connection and used by default, to abst...
ADR-0008
Build database access directly on PDO
The panel needs database access: connections, a way to build queries, and a way to build
and change the schema. Existing database abstraction layers provide all...
ADR-0009
Run as a FrankenPHP worker in a single binary
The panel is one system, shipped as a single binary, as
ADR-0001 decides.
The people who host the panel install and run it themselves. A PHP application is usua...
ADR-0010
Write configuration in TOML
The panel is distributed as a single binary running FrankenPHP, as
ADR-0009 decides. Its configuration is held in typed
configuration objects, as RFC-0002
descr...
ADR-0011
Generate ULID identifiers in PHP
Entities need an identity model, and every entity type needs an identifier of its own.
Some rows need their identifier before they are inserted, as outbox rows...
ADR-0012
Install modules with Composer used as a library
Modules come from two places. A bundled module ships inside
the binary as part of the panel's own codebase, as
ADR-0009 decides for the whole application. An
ex...
ADR-0013
Build core features as modules
The engine is the foundation the rest of the panel is built on, and the module system is its
extension mechanism, open to first-party and third-party modules al...
ADR-0014
Memoise class-level attributes as presence flags
The container consults its instance cache before it reflects on a class, so when it checks the cache it cannot yet tell
whether the class is liminal. A class ca...
ADR-0015
Lock dependencies and pin Composer
composer.lock is gitignored, and every CI job runs composer self-update && composer install && composer dump-autoload. Each run resolves dependencies afresh, ag...
ADR-0016
Support only PostgreSQL 16 and above
The panel assumes MySQL, or a compatible MariaDB, and supports other drivers inside the database component without
exposing them, as ADR-0007 records. MySQL was...
ADR-0017
Produce SQL with a compiler
Every object in the query and schema builders produces its own SQL, as RFC-0003
describes. Thirty-two classes each write their own, interpolating names straight...
ADR-0018
Use bespoke HTTP messages, not PSR-7
PSR-7 is a shared set of HTTP message interfaces for PHP, and PSR-15 adds handler and middleware interfaces over them.
What they offer is interchangeability: mi...
ADR-0019
Use Twig as the template engine
The panel is one server-rendered system, as ADR-0001
decides, so the engine has to turn templates into HTML.
A page is not always rendered whole. A hypermedia i...
ADR-0020
Do not memoise resolution data per parameter
The container supplies a constructor's or method's parameters by reflecting on each one: its type, whether it is
optional, its default and its attributes. Each...
ADR-0021
Route all file access through Flysystem
The engine reads files. Configuration loading is the only part of it that touches one today,
through PHP's own functions and a path taken from Paths. More will...
ADR-0023
Replace MySQL and MariaDB with PostgreSQL
Updated by ADR-0028
The panel assumes MySQL, or a compatible MariaDB, as ADR-0007
records. MySQL is the most common database and the easiest for people installing the panel to set...
ADR-0029
Require a binding for named and qualified resolutions
A binding says how an abstract is produced. Where one abstract is
produced in more than one way, each further way is a named binding or a
qualified binding bene...
Proposed
6 · open for comment
ADR-0022
Store client addresses truncated by default
Some of the records the panel keeps are there to be read afterwards. A session record is read to tell one session from
another: whose it is, when it was last us...
ADR-0024
Give each external module its own schema
PostgreSQL is the panel's only database, as ADR-0023 decides. A
PostgreSQL schema is a namespace for tables inside one database, and a schema can be created or...
ADR-0025
Run migrations only from commands, under maintenance
A migration changes the schema, so whatever runs one needs credentials able to change the schema.
The panel serves every request from long-running worker proces...
ADR-0026
Migrate each deployment in one transaction
Code reaches an installation in two units. A new binary brings every bundled module at
once, per ADR-0009, and cannot be split: the only
way back is the previou...
ADR-0027
Downgrade external modules through a migration map
An external module is installed and updated through Composer, per
ADR-0012. A newer version can bring migrations an older
version does not know, such as a new t...
ADR-0028
Run migrations in module dependency order
Modules keep tables of their own, and one module's tables can refer to another's, such as an
invoice referring to the server it bills. A table has to exist befo...