Skip to content

fix(form): stop passing deprecated $message to V3 variables in validate()#34

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/stabelize_FormV3_vs_Turba
May 22, 2026
Merged

fix(form): stop passing deprecated $message to V3 variables in validate()#34
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/stabelize_FormV3_vs_Turba

Conversation

@TDannhauer
Copy link
Copy Markdown
Contributor

Summary

  • Fixes log spam when legacy Horde_Form validates forms that use V3 variables created by Horde_Form::createVariable().
  • Horde_Form::validate() no longer passes the deprecated second $message argument to V3 BaseVariable instances; it is still passed for legacy Horde_Form_Variable wrappers (e.g. app-specific types without a V3 class).
  • Aligns legacy form validation with Horde\Form\V3\BaseForm::validate(), which already calls $var->validate($vars) with a single argument.

Problem

Horde_Form::createVariable() now returns V3 variables (e.g. Horde\Form\V3\TextVariable) when a modern class exists. Legacy Horde_Form::validate() still called:

@TDannhauer TDannhauer requested a review from ralflang May 18, 2026 21:14
@TDannhauer
Copy link
Copy Markdown
Contributor Author

pls review whether this approach is viable @ralflang .

turba floods the logs with this issue

@amulet1
Copy link
Copy Markdown
Member

amulet1 commented May 19, 2026

We should really finish migration to V3 in other apps first.

@TDannhauer
Copy link
Copy Markdown
Contributor Author

I am open for every approach, but leaving it as it is is not viable imo as turba is flooding logs. stants not stable code

@ralflang ralflang added the bug label May 22, 2026
@ralflang ralflang changed the title Stop passing deprecated $message to V3 variables in Horde_Form::validate() fix(form): stop passing deprecated $message to V3 variables in validate() May 22, 2026
Copy link
Copy Markdown
Member

@ralflang ralflang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also horde/imp#48 log output.

@ralflang ralflang merged commit 8e1a89f into FRAMEWORK_6_0 May 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants