Skip to content

Commit 99aec68

Browse files
authored
Merge pull request #6 from horde/feat/property-for-isValid-message
fix: Discussion from #5 - use a getter and property instead of a return parameter
2 parents 5fc3ce6 + c2a1e93 commit 99aec68

11 files changed

Lines changed: 290 additions & 2 deletions

File tree

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ AI autogenerated may 17th 2025
55
## Overview
66
Horde/Form is a powerful and flexible form handling library that provides a comprehensive set of tools for creating, validating, and processing web forms in PHP applications. It's part of the Horde Application Framework and offers a robust solution for form management with extensive field types and validation capabilities.
77

8+
## UPGRADING FROM FORMS v2
9+
10+
### Minimum
11+
12+
Forms v3 lib/ folder contains a straight conversion of Forms v2 with the following BC breaking changes:
13+
- Most parameters have been changed to NOT use references for primitives. I.e. derived forms and types need to drop the & from parameter signatures
14+
- $type->getInfo($vars, &$info) calls now must be $info = $type->getInfo($vars, $info);
15+
- $bValid = $type->isValid($var, $vars, $value, $message); no longer updates the $message parameter. You need to call $type->getMessage() after $type->isValid if you want to retrieve a potentially set message
16+
17+
This code base is only for easily upgrading existing libraries and apps to Horde 6. It will be deprecated in the next minor release v3.1 and removed in the next major release V4.
18+
19+
### Namespaced
20+
21+
A version with more BC breaking changes is introduced in the src/V3 folder
22+
23+
- Class names follow strict PSR-4 scheme, i.e. Horde_Form_Type_text -> Horde\Form\V3\TextType
24+
- Signatures based on interfaces, deriving from base class is optional
25+
- Proper PER-CS styled code base including types, dropping underscores for properties etc
26+
- This version will be deprecated in V4 and dropped in V5
27+
28+
### V4
29+
30+
- A more involved redesign of Forms based on PHP 8.4 features such as property hooks
31+
32+
833
## Features
934

1035
### Form Field Types

0 commit comments

Comments
 (0)