MMOframework
Why AI Playground Libraries Developers Agency
FR EN
Build a project live
Index

LocalProject

MMO\admin\monitoring · 1 symbol · generated 30 Nov 2026

class

LocalProject

LocalProject.php:25

The project a hub follows, when it is checked out on this machine: what its pages « Project » show beside the fleet -- its git state, the libraries it runs on, its modules and the variants including them, its uncommitted files by package.

class MMO\admin\monitoring\LocalProject
Namespace
MMO\admin\monitoring
Read only, and read from files and `git`: nothing here changes the project. What changes something (the tests, a deployment) runs as the project's own command line ([`ProjectRuns`](https://mmoframework.fr/en/documentation/mmo.admin/php/monitoring/ProjectRuns.md#projectruns)). A hub whose project is elsewhere -- another machine, a hub of declarations only -- has none: [`Of`](https://mmoframework.fr/en/documentation/mmo.admin/php/monitoring/LocalProject.md#localproject-of). Reading the libraries and the variants costs a few `git` subprocesses each: a page asks for them, a summary does not.
$project = LocalProject::Of(Hub::FromFile('~/dev/src/hub.oviepro.com')); $project?->git()->branch; // 'develop' $project?->libraries()['mmo.core']['ok']; // true: 21.0.1 is what `21.*` asks

Index

PHP_SECURITY_UNTILPHP's versions and the end of their security support (php.net/supported-versions): a version past it gets no fix, one within six months of it is to plan.
folder
hub
manifest
modules
states
boards()
changelog($max)What a release would say: the commits since the last one (its v* tag, or its last version X.Y.Z commit, as the release checklist reads it), and the tickets its boards closed since.
changes($libraries)Its uncommitted files, by package: a module's file is the module's, not the project's (the deepest folder wins, as the root hub's ChangeImpact says), and each library clone's are that library's.
debugName()
deployFile()
getBackupsFolder()
getFolder()
getHub()
getLibsFolder()
getManifest()
getName()
getTitle()
getVersion()
git($folder)
libraries($git)The libraries it runs on: what it and its modules ask for, against what its libs/ holds.
logs($keep)The local site's latest errors: the last lines of its logs that the log probe would count as errors (its patterns).
modules()Its modules: one level down each folder its urls names (my.oviepro's modules/), those saying they are its own.
modulesAt($repo, $ref)
Of($hub) static
php()The PHP each machine runs -- this one, and each server (what the system probe read) -- against its security support.
readiness($runs)Whether it is ready to release, check by check: each ok, warning (said, not stopping) or blocking, with what it found and the page « Project » that deals with it.
sites($commits)Each site against its ref: the commit its ref is at here, the one it runs (this machine's deployment history, else what the release probe read of its journal), and the commits it has not had yet.
summary()
unreleased($manifest)
variants($modules)Its variants: the targets of its deploy.json, each with the modules its git ref's configs/config.json includes (a git show each; a ref only on a remote is read there).
__construct($hub, $folder)

Constants1

PHP_SECURITY_UNTIL

PHP's versions and the end of their security support (php.net/supported-versions): a version past it gets no fix, one within six months of it is to plan.

const PHP_SECURITY_UNTIL = […5 items]

Properties5

folder

protected string $folder
Type
string

hub

protected MMO\admin\monitoring\Hub $hub
Type
Hub

modules

protected ?array $modules = null
Type
null | array

states

protected array $states = []
Type
array

Methods26

changelog($max)

LocalProject.php:299

What a release would say: the commits since the last one (its v* tag, or its last version X.Y.Z commit, as the release checklist reads it), and the tickets its boards closed since.

function changelog(int $max = 200): array
$max = 200int
returnsarray?string, to: ?string, since: ?int, commits: list<array>, tickets: list<array>, markdown: string}

changes($libraries)

LocalProject.php:83

Its uncommitted files, by package: a module's file is the module's, not the project's (the deepest folder wins, as the root hub's ChangeImpact says), and each library clone's are that library's.

function changes(bool $libraries = true): array
$libraries = trueboolwhether the libraries' clones are read too (a git status each)
returnsarraylist<array{0: string, 1: string}>> package => [state, path relative to the package]

deployFile()

LocalProject.php:212
function deployFile(): string
returnsstringits deployment declaration: hub.json's local.deploy ({project} its folder), else its deploy.json -- a demo hub names its made-up fleet's, so its pages and runs never list the real sites

getBackupsFolder()

LocalProject.php:470
function getBackupsFolder(): string
returnsstringthe folder of its database dumps: hub.json's local.backups, its db/backups by default

getLibsFolder()

LocalProject.php:64
function getLibsFolder(): string
returnsstringthe MMOFramework libraries it runs on: hub.json's libs, else its libs/

git($folder)

LocalProject.php:72
function git(?string $folder = null): MMO\git\helpers\State
$folder = nullnull | string
returnsStatethe git state of a repository: the project's by default (read once)

libraries($git)

LocalProject.php:140

The libraries it runs on: what it and its modules ask for, against what its libs/ holds.

function libraries(bool $git = true): array
$git = trueboolwhether to read each clone's git too: its state, and the commits since its version (a git or two each)
returnsarrayarray{required: list<string>, via: list<string>, installed: ?string, folder: ?string, ok: bool, unreleased: ?int, state: ?State}> by name: required each constraint asked, via who asks it (project, module <name>), ok whether the installed version satisfies them all, unreleased the commits since its version

logs($keep)

LocalProject.php:441

The local site's latest errors: the last lines of its logs that the log probe would count as errors (its patterns).

function logs(int $keep = 30): arrayThe logs are hub.json's `local.logs` (globs, `{project}` its folder), its `*.log` and `logs.log` by default.
$keep = 30int
returnsarraylist<string>, errors: int, fatal: int, lines: list<array{file: string, line: string, fatal: bool}>}

modules()

LocalProject.php:117

Its modules: one level down each folder its urls names (my.oviepro's modules/), those saying they are its own.

function modules(): array
returnsarrayarray{version: string, folder: string, dependencies: array}> by name

modulesAt($repo, $ref)

LocalProject.php:218
protected function modulesAt(MMO\git\helpers\Repository $repo, string $ref): ?array
$repoRepository
$refstring
returnsnull | arraythe modules configs/config.json includes at $ref (or that ref on a remote), null when unread

Of($hub)

staticLocalProject.php:47
static function Of(MMO\admin\monitoring\Hub $hub): ?MMO\admin\monitoring\LocalProject
$hubHub
returnsnull | LocalProjectthe project $hub follows, when its folder is on this machine with its mmo.json: the hub's project, else the hub's own folder when it is a project's (a hub embedded in its project before project existed)

php()

LocalProject.php:420

The PHP each machine runs -- this one, and each server (what the system probe read) -- against its security support.

function php(): array
returnsarraystring, php: string, until: ?string, status: string}> status ok, warning (six months or less left, or a version this table does not know), critical (past it)

readiness($runs)

LocalProject.php:344

Whether it is ready to release, check by check: each ok, warning (said, not stopping) or blocking, with what it found and the page « Project » that deals with it.

function readiness(?MMO\admin\monitoring\ProjectRuns $runs = null): array
$runs = nullnull | ProjectRunswhere the last runs are kept (the tests, the translations, the backups tested)
returnsarraystring, label: string, status: string, detail: string, page: string}>

sites($commits)

LocalProject.php:241

Each site against its ref: the commit its ref is at here, the one it runs (this machine's deployment history, else what the release probe read of its journal), and the commits it has not had yet.

function sites(int $commits = 20): array
$commits = 20inthow many of the commits not shipped to list, per site
returnsarrayarray{ref: ?string, tags: array, local: ?string, deployed: ?array, behind: ?int, commits: list<array>}> by target: deployed {commit, release, version, date, outcome} (null: nothing known), behind null when either commit is unknown here

summary()

LocalProject.php:481
function summary(): array
returnsarraythe project at a glance, cheap (one git status, the libraries' versions without git): what api/hub/project.json and php hub.php project give

unreleased($manifest)

LocalProject.php:179
protected function unreleased(MMO\core\helpers\PackageManifest $manifest): ?int
$manifestPackageManifest
returnsnull | intthe commits of a library since its version last changed: a library to release before the project ships

variants($modules)

LocalProject.php:191

Its variants: the targets of its deploy.json, each with the modules its git ref's configs/config.json includes (a git show each; a ref only on a remote is read there).

function variants(bool $modules = true): array
$modules = trueboolwhether to read the modules of each (a git show each): without, modules is null
returnsarrayarray{ref: ?string, url: ?string, tags: array, modules: ?list<string>}> by target; modules null when the ref cannot be read

__construct($hub, $folder)

LocalProject.php:36
function __construct(MMO\admin\monitoring\Hub $hub, string $folder)
$hubHubthe hub following it
$folderstringthe project's folder, holding its mmo.json