From 7aa22c98d44bf2ea83adf8cdfee4a2c7e7415d1f Mon Sep 17 00:00:00 2001 From: Johannes Wachter Date: Tue, 21 Feb 2017 08:52:36 +0100 Subject: [PATCH] added options to allow extra fields --- Document/Form/ArticleDocumentType.php | 13 +++++++++++++ Tests/travis.php.ini | 2 +- composer.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Document/Form/ArticleDocumentType.php b/Document/Form/ArticleDocumentType.php index f3c648411..35e092648 100644 --- a/Document/Form/ArticleDocumentType.php +++ b/Document/Form/ArticleDocumentType.php @@ -14,6 +14,7 @@ use Sulu\Bundle\ContentBundle\Form\Type\AbstractStructureBehaviorType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; /** * Form-type for article mapping. @@ -36,4 +37,16 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('navigationContexts', TextType::class, ['mapped' => false]); $builder->add('shadowLocaleEnabled', TextType::class, ['mapped' => false]); } + + /** + * {@inheritdoc} + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults( + [ + 'allow_extra_fields' => true, + ] + ); + } } diff --git a/Tests/travis.php.ini b/Tests/travis.php.ini index ffbecf14b..92a5ffdcc 100644 --- a/Tests/travis.php.ini +++ b/Tests/travis.php.ini @@ -1 +1 @@ -memory_limit = 1536M +memory_limit = 2048M diff --git a/composer.json b/composer.json index c5b5a8f50..dbb07becb 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "symfony/monolog-bundle": "2.4.*", "doctrine/doctrine-bundle": "1.4.*", "jackalope/jackalope-doctrine-dbal": "^1.2.5", - "phpunit/phpunit": ">=4.8", + "phpunit/phpunit": ">=4.8, <6.0", "php-task/task-bundle": "@dev", "php-task/php-task": "@dev"