diff --git a/src/lib/Form/Type/Content/BaseContentType.php b/src/lib/Form/Type/Content/BaseContentType.php index 9dd6242..86f1ddc 100644 --- a/src/lib/Form/Type/Content/BaseContentType.php +++ b/src/lib/Form/Type/Content/BaseContentType.php @@ -73,6 +73,12 @@ public function configureOptions(OptionsResolver $resolver) return $value; } + trigger_deprecation( + 'ibexa/content-forms', + 'v4.6', + 'The option "struct" with null value is deprecated and will be required in v5.0.' + ); + return $options['contentUpdateStruct'] ?? $options['contentCreateStruct'] ?? null; @@ -101,20 +107,6 @@ public function configureOptions(OptionsResolver $resolver) 'ibexa/content-forms', 'v4.6.4', 'The option "%name%" is deprecated, use "struct" instead.' - ) - ->setNormalizer( - 'struct', - static function (Options $options, ?ContentStruct $value): ?ContentStruct { - if ($value === null) { - trigger_deprecation( - 'ibexa/content-forms', - 'v4.6', - 'The option "struct" with null value is deprecated and will be required in v5.0.' - ); - } - - return $value; - } ); } }