From ed526fa8eaace566088be977c9268927a40c18dd Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 11 Apr 2018 16:41:35 +0200 Subject: [PATCH] fix deprecations: no more need to define these services (that cause a deprecation...) --- Form/Extension/PostTextIntegerExtension.php | 3 +-- Form/Extension/PostTextNumberExtension.php | 3 +-- Resources/config/services.yml | 26 ++++++++++----------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Form/Extension/PostTextIntegerExtension.php b/Form/Extension/PostTextIntegerExtension.php index 1829501b8..5b42411a5 100644 --- a/Form/Extension/PostTextIntegerExtension.php +++ b/Form/Extension/PostTextIntegerExtension.php @@ -30,8 +30,7 @@ class PostTextIntegerExtension extends PostTextExtension { public function getExtendedType() { - // return IntegerType::class; !! only for symfony 2.8 - return 'integer'; + return IntegerType::class; } } diff --git a/Form/Extension/PostTextNumberExtension.php b/Form/Extension/PostTextNumberExtension.php index f934f6c05..730d180f0 100644 --- a/Form/Extension/PostTextNumberExtension.php +++ b/Form/Extension/PostTextNumberExtension.php @@ -28,8 +28,7 @@ class PostTextNumberExtension extends PostTextExtension { public function getExtendedType() { - //return PostTextNumberExtension::class; - return 'number'; + return PostTextNumberExtension::class; } } diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 08953ef82..a9be9193d 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -39,7 +39,7 @@ services: - "@chill.main.helper.translatable_string" tags: - { name: 'chill.custom_field', type: 'text' } - + chill.custom_field.number: class: Chill\CustomFieldsBundle\CustomFields\CustomFieldNumber arguments: @@ -48,15 +48,16 @@ services: tags: - { name: 'chill.custom_field', type: 'number' } - chill.form_extension.post_text_integer: - class: Chill\CustomFieldsBundle\Form\Extension\PostTextIntegerExtension - tags: - - { name: form.type_extension, alias: 'integer' } - - chill.form_extension.post_text_number: - class: Chill\CustomFieldsBundle\Form\Extension\PostTextNumberExtension - tags: - - { name: form.type_extension, alias: 'number' } + # no more used in symfony 3.x + # chill.form_extension.post_text_integer: + # class: Chill\CustomFieldsBundle\Form\Extension\PostTextIntegerExtension + # tags: + # - { name: form.type_extension, alias: 'integer' } + + # chill.form_extension.post_text_number: + # class: Chill\CustomFieldsBundle\Form\Extension\PostTextNumberExtension + # tags: + # - { name: form.type_extension, alias: 'number' } chill.custom_field.choice: class: Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice @@ -109,7 +110,7 @@ services: - "%chill_custom_fields.show_empty_values%" tags: - { name: twig.extension } - + chill.custom_field.custom_field_long_choice: class: Chill\CustomFieldsBundle\CustomFields\CustomFieldLongChoice arguments: @@ -118,10 +119,9 @@ services: - "@templating" tags: - { name: 'chill.custom_field', type: 'long_choice' } - + chill.custom_field.custom_field_long_choice_option_repository: class: Chill\CustomFieldsBundle\EntityRepository\CustomFieldLongChoice\OptionRepository factory: ["@doctrine", getRepository] arguments: - "Chill\\CustomFieldsBundle\\Entity\\CustomFieldLongChoice\\Option" - \ No newline at end of file