Skip to content

Commit 8ae9a1f

Browse files
committed
minor #21565 [Validator] Make public property requirement clearer for constraint options (kleinmann)
This PR was merged into the 6.4 branch. Discussion ---------- [Validator] Make public property requirement clearer for constraint options <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> The current language seems to allow for non-public properties, but in practice this fails, because the corresponding property remains uninitialized after deserialization. An accidental private option can also be a bit of a headscratcher to pin down, since it may occur only once it is run in a production environment (due to different cache configurations). Commits ------- eeaf4cc Make public property requirement clearer for constraint options
2 parents 9064c90 + eeaf4cc commit 8ae9a1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ You can use custom validators like the ones provided by Symfony itself:
266266
}
267267
}
268268
269-
If your constraint contains options, then they should be public properties
269+
If your constraint contains options, then they must be public properties
270270
on the custom Constraint class you created earlier. These options can be
271271
configured like options on core Symfony constraints.
272272

0 commit comments

Comments
 (0)