Skip to content

Internals Packages

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

Packages internals

Framework Internals · Developer guide

PackageRepository reads/writes awt_package rows and disables database read caching through DoNotCache. PackageService hydrates InstalledPackage objects. PackageFacade exposes installed lookup and status management; PackageManifestFacade combines a disk manifest reader with its service. Package extends Model and stores both normalized dependency arrays and a Dependency ObjectCollection when explicitly built.

The authoritative startup metadata is the installed database record, not a fresh manifest scan. Enabled packages are ordered with system packages first in repository output, then actual dependency order is enforced by the orchestrator. Types 1/2 run; type 0 does not. Package::getInfo() labels types as System/Plugin/Theme, but runtime eligibility is simply nonzero.

ManifestReader validates JSON shape, name/version/type/dependency contracts, handles BOMs, and validates optional string/bool metadata. Dependency constraints implement wildcard, exact and AND-comparisons using version_compare, with no Composer constraint solver. Installation validates target versions but enabled-state constraints are enforced at startup. Space-stripped package folder names can collide; no explicit normalized-path collision validator exists.

Package persistence encodes dependencies before save and restores the normalized in-memory array in finally. getDependencies() also normalizes stored JSON. Package/InstalledPackage inherit Model's hydration/persistence attributes, so public metadata not present in the actual schema must not be assumed persistable. store_id accessors exist but the framework installer does not create that column.

Component reference

Clone this wiki locally