From ecdf2a2ea6b7f1270a8f6d77ed8a738c39ee9f65 Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Thu, 2 Jul 2026 08:44:33 +0200 Subject: [PATCH 1/3] feat(ingo): use FQCN Variable references and vendor-namespaced classes --- lib/Form/Forward.php | 2 +- lib/Form/Spam.php | 2 +- lib/Form/Vacation.php | 4 ++-- src/Form/V3/FoldersVariable.php | 2 +- src/Form/V3/LongemailVariable.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Form/Forward.php b/lib/Form/Forward.php index 01cbe3c..680b8f2 100644 --- a/lib/Form/Forward.php +++ b/lib/Form/Forward.php @@ -28,7 +28,7 @@ public function __construct($vars, $title = '', $name = null) $v = $this->addVariable(_("Keep a copy of messages in this account?"), 'keep_copy', 'boolean', false); $v->setHelp('forward-keepcopy'); - $v = $this->addVariable(_("Address(es) to forward to:"), 'addresses', 'ingo:Longemail', false, false, null, [5, 40]); + $v = $this->addVariable(_("Address(es) to forward to:"), 'addresses', \Horde\Ingo\Form\V3\LongemailVariable::class, false, false, null, [5, 40]); $v->setHelp('forward-addresses'); $this->setButtons(_("Save")); } diff --git a/lib/Form/Spam.php b/lib/Form/Spam.php index 416830f..9d72b93 100644 --- a/lib/Form/Spam.php +++ b/lib/Form/Spam.php @@ -50,7 +50,7 @@ public function __construct($vars, $title = '', $name = null) $this->folder_var = $this->addVariable( _("Folder to receive spam:"), 'folder', - 'ingo:folders', + \Horde\Ingo\Form\V3\FoldersVariable::class, true ); $this->folder_var->setHelp('spam-folder'); diff --git a/lib/Form/Vacation.php b/lib/Form/Vacation.php index b2a3770..dca53c5 100644 --- a/lib/Form/Vacation.php +++ b/lib/Form/Vacation.php @@ -72,11 +72,11 @@ public function __construct($vars, $title = '', $name = null, $features = null) || $this->hasFeature('days')) { $this->setSection('advanced', _("Advanced Settings")); if ($this->hasFeature('addresses')) { - $v = $this->addVariable(_("My email addresses:"), 'addresses', 'ingo:Longemail', true, false, null, [5, 40]); + $v = $this->addVariable(_("My email addresses:"), 'addresses', \Horde\Ingo\Form\V3\LongemailVariable::class, true, false, null, [5, 40]); $v->setHelp('vacation-myemail'); } if ($this->hasFeature('excludes')) { - $v = $this->addVariable(_("Addresses to not send responses to:"), 'excludes', 'ingo:Longemail', false, false, null, [10, 40]); + $v = $this->addVariable(_("Addresses to not send responses to:"), 'excludes', \Horde\Ingo\Form\V3\LongemailVariable::class, false, false, null, [10, 40]); $v->setHelp('vacation-noresponse'); } if ($this->hasFeature('ignorelist')) { diff --git a/src/Form/V3/FoldersVariable.php b/src/Form/V3/FoldersVariable.php index 45166cb..76592be 100644 --- a/src/Form/V3/FoldersVariable.php +++ b/src/Form/V3/FoldersVariable.php @@ -1,6 +1,6 @@ Date: Thu, 2 Jul 2026 09:39:36 +0200 Subject: [PATCH 2/3] chore: Depend on horde/form 3.1 for the FCQN feature --- .horde.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.horde.yml b/.horde.yml index 8b5414d..e03fabf 100644 --- a/.horde.yml +++ b/.horde.yml @@ -48,7 +48,7 @@ dependencies: horde/core: ^3 horde/exception: ^3 horde/group: ^3 - horde/form: ^3 + horde/form: ^3.1 horde/imap_client: ^3 horde/managesieve: ^2 horde/mime: ^3 diff --git a/composer.json b/composer.json index d175d91..8a99909 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "horde/core": "^3 || dev-FRAMEWORK_6_0", "horde/exception": "^3 || dev-FRAMEWORK_6_0", "horde/group": "^3 || dev-FRAMEWORK_6_0", - "horde/form": "^3 || dev-FRAMEWORK_6_0", + "horde/form": "^3.1 || dev-FRAMEWORK_6_0", "horde/imap_client": "^3 || dev-FRAMEWORK_6_0", "horde/managesieve": "^2 || dev-FRAMEWORK_6_0", "horde/mime": "^3 || dev-FRAMEWORK_6_0", From 35c0c3f768296e7eb02eccc5a4d08f1dac70bfe2 Mon Sep 17 00:00:00 2001 From: Ralf Lang Date: Thu, 2 Jul 2026 20:55:26 +0200 Subject: [PATCH 3/3] fix: expose legacy names in getTypeName() --- src/Form/V3/FoldersVariable.php | 10 ++++++++++ src/Form/V3/LongemailVariable.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/Form/V3/FoldersVariable.php b/src/Form/V3/FoldersVariable.php index 76592be..13aaf44 100644 --- a/src/Form/V3/FoldersVariable.php +++ b/src/Form/V3/FoldersVariable.php @@ -30,6 +30,16 @@ class FoldersVariable extends BaseVariable public $_folder; public $newFolderSet; + /** + * Return the legacy type name so Ingo_Ui_VarRenderer_Html's + * _renderVarInput_ingo_form_type_folders() is still dispatched to after + * the class was moved from Ingo\Form\V3 to Horde\Ingo\Form\V3. + */ + public function getTypeName(): string + { + return 'ingo_form_type_folders'; + } + public function isValid(Horde_Variables|Variables $vars, $value): bool { if ($this->newFolderSet || strlen($value)) { diff --git a/src/Form/V3/LongemailVariable.php b/src/Form/V3/LongemailVariable.php index dd7ebd5..fdc3967 100644 --- a/src/Form/V3/LongemailVariable.php +++ b/src/Form/V3/LongemailVariable.php @@ -30,6 +30,16 @@ */ class LongemailVariable extends LongtextVariable { + /** + * Return the legacy type name so Ingo_Ui_VarRenderer_Html's + * _renderVarInput_ingo_form_type_longemail() is still dispatched to after + * the class was moved from Ingo\Form\V3 to Horde\Ingo\Form\V3. + */ + public function getTypeName(): string + { + return 'ingo_form_type_longemail'; + } + /** */ public function isValid(Horde_Variables|Variables $vars, $value): bool