Skip to content

fix(ingo): remove deprecated V3 form shims in vacation/spam forms - #37

Merged
TDannhauer merged 2 commits into
FRAMEWORK_6_0from
fix/form-v3-deprecation-warnings
Jul 9, 2026
Merged

TDannhauer merged 2 commits into
FRAMEWORK_6_0from
fix/form-v3-deprecation-warnings

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Remove two sources of repeated WARN log noise introduced by the V3 form migration, with no functional behavior change.

Motivation

With the lib/ → src/V3/ form migration, Horde_Form_Variable and Horde_Form_Type were merged into a single Horde\Form\V3\BaseVariable class. Two backward-compatibility shims now log a deprecation warning on every use:

  • getInfo($vars, $info) — the second $info argument is ignored and warns if passed.
  • ->type — accessing this legacy property returns $this and warns.

Two Ingo call sites still used the deprecated shapes, spamming horde.log on every vacation-form validation and every load of the spam-filtering page.

Changes

  • Ingo_Form_Vacation::validate(): call getInfo($vars) without the unused second argument.
  • Ingo_Basic_Spam::_init() / Ingo_Form_Spam::validate(): call setFolder() / set newFolderSet directly on folder_var instead of through the deprecated ->type accessor (which already just returned the same object).

Test plan

  • Vacation form: verify end date prior to start date, and end date prior to today, still fail validation as before.
  • Spam filtering page: verify the folder select still pre-fills and a newly-typed folder still validates without a "target folder is required" error.
  • Confirm the two Variable property 'type' is deprecated / getInfo() ... $info ... deprecated warnings no longer appear in the log for these code paths.

Horde_Form\V3\BaseVariable::getInfo() now logs a deprecation warning
whenever a second argument is passed, since the $info parameter is
ignored after the Type/Variable merge in the V3 form migration.
Ingo_Form_Vacation::validate() was still passing an unused empty
array, spamming the log on every vacation form validation.
The legacy Horde_Form_Variable/Horde_Form_Type split was merged into
a single Horde\Form\V3\BaseVariable class. Reaching through the
compatibility shim's ->type accessor now logs a deprecation warning
on every access. Ingo_Basic_Spam and Ingo_Form_Spam still used this
indirection to call setFolder() and set newFolderSet on the folder
variable; both now operate directly on the variable object, which
__get(type) already resolved to.
@TDannhauer
TDannhauer merged commit 552680a into FRAMEWORK_6_0 Jul 9, 2026
1 check failed
@TDannhauer
TDannhauer deleted the fix/form-v3-deprecation-warnings branch July 10, 2026 11:09
ralflang added a commit that referenced this pull request Jul 18, 2026
Release version 4.0.1

Merge pull request #38 from horde/fix/unserialize-mail-allowed-classes
test(storage): extend Ingo_Unit_TestBase in unserialize test
fix(storage): allow nested mail classes in rule unserialize
Merge pull request #37 from horde/fix/form-v3-deprecation-warnings
fix(ingo): remove deprecated ->type indirection in spam form
fix(ingo): remove deprecated getInfo() $info argument in vacation form
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.

1 participant