Uh oh!
There was an error while loading. Please reload this page.
refactor(encryption): Migrate appconfig keys to typed bool IAppConfig with repair step - #60002
Conversation
cuppett
left a comment
There was a problem hiding this comment.
I don't know the convention when trying to refactor the legacy values out. Happy to simplify to only the minimal set or wait until next version for another PR. Just LMK.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
864ad6a to
f3679b4Comparef3679b4 to
39b6d31CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
a6fff8f to
e4f6eceComparee5291af to
07461eeComparecuppett
commented
May 1, 2026
The psalm things (DAV) seem to be coming from the master branch (not related to this PR). Do I need to fix that or can it be overridden to merge? |
artonge
left a comment
There was a problem hiding this comment.
Looks good, thanks for splitting :)
The psalm error is indeed unrelated.
6e52b67 to
c4baa76Comparec4baa76 to
ef7b789Compareef7b789 to
9f0c402Compareb7d805f to
50ec557Comparecuppett
commented
Jun 10, 2026
Rebased, fixed some nit conflicts, caught a couple new occurrences of IConfig and force-pushed. |
50ec557 to
ad56a2eComparecuppett
commented
Jun 20, 2026
Resolved conflicts, rebased on master |
ad56a2e to
c34edcbCompareUnclear why this is still set. Resolved comments. Thanks!
cuppett
commented
Jun 22, 2026
@artonge I can't tell why this one isn't merging, can you assist here? |
… with repair step Switch all encryption config reads/writes from deprecated string-typed IConfig to bool-typed IAppConfig (getValueBool/setValueBool). Adds RetypeEncryptionConfigKeys repair step to retype existing string values to bool on upgrade. Includes lazy IAppConfig resolution in Manager and AppConfigTypeConflictException fallbacks throughout for safety during the upgrade window. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Apply suggestion from @artonge Co-authored-by: Louis <louis@chmn.me> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Co-authored-by: Louis <louis@chmn.me> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
The IAppConfig API converts stored values to bool on read (getValueBool) and re-stamps the type on write (setValueBool), so legacy string-typed encryption config keys migrate lazily without an explicit repair step. Per PR review feedback, drop the repair step, its test, and the related AppConfigTypeConflictException fallback in Encryption\Manager::isEnabled that only existed to bridge the now-unneeded migration window. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
… to match strict 'yes'-only validation The verifyConfigKey check on core.encryption_enabled was reverted to master's strict $value !== 'yes' in 626fadd per review feedback, but the test data providers still asserted the broader truthy set (1/true/YES/on). Drop those entries so the tests match the controller. This is validation, not storage — IAppConfig::setValueBool's broader input handling is unrelated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Update to annotation from docblock comment Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
…AdminTest The production code already uses getValueBool for this key; the IConfig mock branch was unreachable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
…yped APIs
Replace IConfig::{get,set}UserValue for the per-user 'recoveryEnabled' key
with IUserConfig::{getValueBool,setValueBool}, and IConfig::getAppValue for
'useMasterKey' with IAppConfig::getValueBool. IConfig is removed from Util
and Recovery constructors entirely. Clears the DeprecatedMethod psalm-baseline
entries for apps/encryption/lib/Util.php and the string-typed recoveryAdminEnabled
calls that were still in Recovery.php.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>… in encryption tests Addresses reviewer feedback requesting consistent mock callback style in RecoveryTest and UtilTest. Drops the now-unused setValueTester, getValueTester, and removeValueTester helper methods. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Update EncryptionTrait, EncryptionMasterKeyUploadTest, EncryptionUploadTest, and EncryptedSizePropagationTest to use typed IAppConfig::setValueBool/ getValueBool for encryption_enabled and useMasterKey, preventing AppConfigTypeConflictException when the keys are stored as BOOL type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
c34edcb to
b86fa0dComparecuppett
commented
Jul 4, 2026
Rebase only |
Summary
Switch all encryption config reads/writes from deprecated string-typed IConfig to bool-typed IAppConfig (getValueBool/setValueBool). Adds RetypeEncryptionConfigKeys repair step to retype existing string values to bool on upgrade. Includes lazy IAppConfig resolution in Manager and AppConfigTypeConflictException fallbacks throughout for safety during the upgrade window.
conflict between new type (mixed) and old type (boolean)#58778Checklist
3. to review, feature component)stable32)AI (if applicable)