Skip to content

Commit e937b35

Browse files
committed
minor #12736 [Valid] [Validator] [Constraints] [DEPRECATION] Added deprication note on Valid constraint validator for deep option. (Balazs Csaba)
This PR was merged into the 2.7 branch. Discussion ---------- [Valid] [Validator] [Constraints] [DEPRECATION] Added deprication note on Valid constraint validator for deep option. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #12695 | License | MIT | Doc PR | - Commits ------- 46f1eb0 Added deprication note on Valid constraint validator for deep option.
2 parents 7d6aba1 + 7a91f56 commit e937b35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Constraints/Valid.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function __construct($options = null)
4040
));
4141
}
4242

43+
if (is_array($options) && array_key_exists('deep', $options)) {
44+
trigger_error('The "deep" option for the Valid constraint is deprecated since 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED);
45+
}
46+
4347
parent::__construct($options);
4448
}
4549
}

0 commit comments

Comments
 (0)