Documentation
¶
Overview ¶
Package phpini centralizes the php.ini editor's scope handling so the CLI, the web UI, and the MCP server share one definition of what a scope is, which file it maps to, and which containers a change restarts. A scope is one of:
"shared" the version-agnostic file applied to every PHP version "<version>" an installed PHP version's own file (e.g. "8.4") "site:<name>" a FrankenPHP site's own per-site file
The shared file mounts below the per-version file in every container's conf.d, so a per-version (or per-site) key always overrides a shared one.
Index ¶
Constants ¶
SharedScope is the editor scope for the version-agnostic shared php.ini.
SharedTemplate seeds the editor for the shared file. Applies to every version, with a per-version file winning on any conflicting key.
const UserTemplate = `` /* 277-byte string literal not displayed */
UserTemplate seeds the editor when a per-version or per-site file does not exist yet. Matches the stub the podman EnsureUserIni writes so the editor shows the same guidance.
Variables ¶
This section is empty.
Functions ¶
func Ensure ¶
Ensure seeds the on-disk file backing a scope so the bind-mount source stays a regular file (podman would otherwise auto-create a directory at the conf.d path). Safe to call repeatedly; it never overwrites an existing file.
func Restart ¶
Restart applies a scope's ini change by restarting the containers that mount it. For the shared file that is every installed version's FPM plus its per-site containers; for a version, that one FPM plus its per-site containers; for a site, just that FrankenPHP container.
func RestartNoSeed ¶
RestartNoSeed restarts a scope's container(s) after a reset. The per-version file is not re-seeded (the shared FPM tolerates its absence: only that one version's container mounts it, and the reset means "no per-version override"). The shared file IS re-seeded first, because every PHP container mounts it and a missing bind-mount source makes them all fail to start; re-seeding the commented template is functionally "no shared override" while keeping the mount valid. A FrankenPHP site is re-seeded for the same bind-mount reason.
Types ¶
This section is empty.