From 411d56de5045d1df9474663e1983c36f1fc5c0ea Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 24 Jan 2025 13:51:14 +0100 Subject: [PATCH] add missing changelog/upgrade entries --- UPGRADE-7.3.md | 23 ++++++++++++++++++++ src/Symfony/Component/Validator/CHANGELOG.md | 19 ++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/UPGRADE-7.3.md b/UPGRADE-7.3.md index 61f69a3acf37..9ae07e8af692 100644 --- a/UPGRADE-7.3.md +++ b/UPGRADE-7.3.md @@ -42,6 +42,29 @@ Serializer * Deprecate the `CompiledClassMetadataFactory` and `CompiledClassMetadataCacheWarmer` classes +Validator +--------- + + * Deprecate passing an array of options to the constructors of the constraint classes, pass each option as a dedicated argument instead + + Before: + + ```php + new NotNull([ + 'groups' => ['foo', 'bar'], + 'message' => 'a custom constraint violation message', + ]) + ``` + + After: + + ```php + new NotNull( + groups: ['foo', 'bar'], + message: 'a custom constraint violation message', + ) + ``` + VarDumper --------- diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index 70468d4d3fdb..5f4872a7bbf5 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -4,6 +4,25 @@ CHANGELOG 7.3 --- + * Deprecate passing an array of options to the constructors of the constraint classes, pass each option as a dedicated argument instead + + Before: + + ```php + new NotNull([ + 'groups' => ['foo', 'bar'], + 'message' => 'a custom constraint violation message', + ]) + ``` + + After: + + ```php + new NotNull( + groups: ['foo', 'bar'], + message: 'a custom constraint violation message', + ) + ``` * Add support for ratio checks for SVG files to the `Image` constraint * Add the `Slug` constraint