The Game Panel Design record
The Game Panel

Proposals

Proposals for how an area should work, argued before it is built. A decided proposal is frozen: later thinking arrives as a new document, never as an edit.

Accepted

7 · frozen

RFC-0001 Dependency injection container Updated by RFC-0006, RFC-0007 A dependency injection container that constructs objects and supplies their dependencies. Classes are resolved automatically from their constructor signatures,... RFC-0002 Configuration objects Updated by RFC-0004 A configuration component in which each configuration is an instance of a class unique to it, registered against a module and a name, held in an immutable catal... RFC-0003 Database component Updated by RFC-0004, RFC-0012 A database component built directly on PDO. Any number of named connections are configured, one of them is designated the primary connection and used whenever n... RFC-0004 TOML configuration loading Updated by RFC-0005, RFC-0008 Configuration is read from TOML files: a main file, drop-in overrides applied in order, and one file for each enabled module, merged into a single tree with env... RFC-0005 Paths value object Updated by RFC-0008 A single Paths value object holds every filesystem location the engine needs: configuration, data, modules, cache and logs. Bootstrap constructs it once, from t... RFC-0006 Container improvements Updated by RFC-0007 We will change how the container caches shared instances and resolves classes. Shared instances will be kept in one instance cache type, used once with strong r... RFC-0007 Binding lifetimes We will replace the shared flag on a binding with a lifetime of three states: Process, resolved once and held until the worker restarts; Cycle, resolved once pe...

Proposed

10 · open for comment

RFC-0008 Filesystems We will reach the engine's files through named filesystems, held in an immutable catalogue that resolves them by name, and give the engine three of them: config... RFC-0009 Events We will add a synchronous, in-process event dispatcher in which any object can be an event. Listeners will be registered against an event type by handler refere... RFC-0010 HTTP transport We will build the engine's HTTP layer from immutable request and response objects, a middleware pipeline wrapping a terminal handler, and a route table the engi... RFC-0011 Views We will render HTML on the server from Twig templates, drawn from an ordered source chain in which later registration wins, so a theme or a module can replace a... RFC-0012 PostgreSQL database layer We will move the database component to PostgreSQL and behind a compiler. Each query and schema object will become a node describing what is wanted, and the comp... RFC-0013 Entities We will add a thin layer over the database: an entity identifier type for each entity, an entity map holding the entities loaded during one unit of work along w... RFC-0014 Sessions We will add server-side sessions, keyed by a cookie and stored in the database, with flash state carrying one value from the request that writes it to the reque... RFC-0015 Module system We will add the engine's extension mechanism, in which a module is either bundled inside the binary or installed as a Composer package, and is described by the... RFC-0016 Module scopes We will make a resolution know which module's code it is constructing. The container will hold a stack of module scopes, pushing a binding's owner while that bi... RFC-0017 Migration runner We will run each module's migrations in module dependency order, one transaction for each deployment, from management commands that hold a lock while they run....