Skip to content

Config sample migration and updating PHP versions to 8.4 and 8.5#135

Merged
WolfangAukang merged 5 commits into
masterfrom
config-sample-migration
May 20, 2026
Merged

Config sample migration and updating PHP versions to 8.4 and 8.5#135
WolfangAukang merged 5 commits into
masterfrom
config-sample-migration

Conversation

@WolfangAukang
Copy link
Copy Markdown
Contributor

No description provided.

jsokol added 3 commits May 19, 2026 16:19
Copy config.sample.php into config.php before the existing sed
substitutions, and gate config writing + DB setup + mail settings
behind an opt-in trigger (any SIMPLERISK_DB_* env var or DB_SETUP).
When the operator provides no DB env vars, config.php is left
absent so the SimpleRisk web installer takes over.

Also remove the SIMPLERISK_INSTALLED toggle (define no longer
exists upstream) and the version=testing URL-uncomment block
(its target defines are gone from the new template).
Handle the upgrade-on-persisted-volume case where config.sample.php
is absent (only config.php from the old image exists) by reusing the
existing file. The subsequent sed substitutions still apply env-var
values via the generic ('FOO', '...') regex. Fall back to fatal_error
if neither file is present.

Also scope CONFIG_PATH and CONFIG_SAMPLE_PATH to set_config() with
the local keyword.
Copy config.sample.php into config.php before the existing sed
substitutions run, with a defensive fallback for upgrade users
whose persisted /var/www/simplerisk volume has an old config.php
but no config.sample.php. The bundled-MySQL provisioning flow is
otherwise unchanged; the SimpleRisk installer's admin-detection
handles the no-admin case on first browser hit.

Also remove the SIMPLERISK_INSTALLED toggle (define is gone
upstream) and the version=testing URL-uncomment line (its target
defines no longer exist in the template).
@WolfangAukang WolfangAukang changed the title Config sample migration Config sample migration and updating PHP versions to 8.4 and 8.5 May 20, 2026
@WolfangAukang WolfangAukang force-pushed the config-sample-migration branch from cd9e3f6 to 96d0ea4 Compare May 20, 2026 15:36
@WolfangAukang WolfangAukang merged commit d594ce9 into master May 20, 2026
5 checks passed
@WolfangAukang WolfangAukang deleted the config-sample-migration branch May 20, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants