Skip to content

Commit 205300d

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [Validator] PHP 7.4 uninitialized typed property handling
2 parents 73874a9 + 04e46ae commit 205300d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

validation.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,12 @@ class to have at least 3 characters.
611611
}
612612
}
613613
614+
.. caution::
615+
616+
The validator will use a value ``null`` if a typed property is uninitialized.
617+
This can cause unexpected behavior if the property holds a value when initialized.
618+
In order to avoid this, make sure all properties are initialized before validating them.
619+
614620
.. index::
615621
single: Validation; Getter constraints
616622

0 commit comments

Comments
 (0)