From 832aa7368e905b2852274d12afdacb8511a71fe9 Mon Sep 17 00:00:00 2001 From: Nathan Waelkens Date: Wed, 8 Nov 2017 15:33:37 +0000 Subject: [PATCH 1/2] Added requirement Added Symfony compatibility requirement in the composer.json Affected file modified: composer.json --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 357538e3..1cc765e7 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "license": "MIT", "require": { "php": "^5.5 || ^7.0", + "symfony/symfony": "^2.8.7 || ^3.0", "sulu/sulu": "^1.3 || dev-develop", "beberlei/DoctrineExtensions": "^1.0" }, From 62da9c14e861df40975dce59b550f084b59d45a3 Mon Sep 17 00:00:00 2001 From: Nathan Waelkens Date: Wed, 8 Nov 2017 15:51:28 +0000 Subject: [PATCH 2/2] Changed formfield option types The used option types were incompatible with Symfony 3. old -> new ------------ type -> entry_type options -> options_type property -> choice_label Affected files: modified: Form/Type/ProfileAddressType.php modified: Form/Type/ProfileContactType.php --- Form/Type/ProfileAddressType.php | 2 +- Form/Type/ProfileContactType.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Form/Type/ProfileAddressType.php b/Form/Type/ProfileAddressType.php index 525c2628..9601fba7 100644 --- a/Form/Type/ProfileAddressType.php +++ b/Form/Type/ProfileAddressType.php @@ -42,7 +42,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) EntityType::class, [ 'class' => Country::class, - 'property' => function (Country $country) { + 'choice_label' => function (Country $country) { return Intl::getRegionBundle()->getCountryName($country->getCode()); }, ] diff --git a/Form/Type/ProfileContactType.php b/Form/Type/ProfileContactType.php index 1a7c7cda..5e9dfcf9 100644 --- a/Form/Type/ProfileContactType.php +++ b/Form/Type/ProfileContactType.php @@ -54,8 +54,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) CollectionType::class, [ 'label' => false, - 'type' => $options['contact_address_type'], - 'options' => $options['contact_address_type_options'], + 'entry_type' => $options['contact_address_type'], + 'entry_options' => $options['contact_address_type_options'], ] ); $builder->add( @@ -63,8 +63,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) CollectionType::class, [ 'label' => false, - 'type' => $options['note_type'], - 'options' => $options['note_type_options'], + 'entry_type' => $options['note_type'], + 'entry_options' => $options['note_type_options'], ] ); }