From 408c774e53a0c88069953262c1e5c3414f2fae22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 30 Jun 2015 14:43:27 +0200 Subject: [PATCH] move to symfony 2.7 + implements acl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit merge of branch add_acl Squashed commit of the following: commit b112df16e568ad4a305e290b4cca9eb696bcf5d7 Merge: f8c44ca 11324cb Author: Julien Fastré Date: Tue Jun 30 09:59:03 2015 +0200 Merge remote-tracking branch 'origin/master' into add_acl commit f8c44ca20b5a53fb18da00ab265d626dd8c770b2 Author: Julien Fastré Date: Fri Jun 5 22:47:50 2015 +0200 fix Form signature to match abstractForm OptionsResolverInterface => OptionsResolver commit 586155ecfa85240d683aa8bd37493e948f89cd67 Author: Julien Fastré Date: Fri Jun 5 22:47:25 2015 +0200 remove deprecation warnings from phpunit commit 6ada3ddef336b958a886215fcdb040a29f5a411f Author: Julien Fastré Date: Fri Jun 5 22:30:30 2015 +0200 replace deprecated setDefaultOptions setdefaultsOptions => configureOptions commit 28b0e258d52b08ecd3799e19b15bd4b1f1e58f83 Author: Julien Fastré Date: Fri Jun 5 11:20:30 2015 +0200 fix twig.form.resources deprecations commit cb09035c8f0eb74192f7e3e68c93c6378f158f2f Author: Julien Fastré Date: Fri Jun 5 10:58:19 2015 +0200 switch to symfony 2.7 [ci skip] --- DependencyInjection/ChillCustomFieldsExtension.php | 2 +- Form/CustomFieldType.php | 4 ++-- Form/CustomFieldsGroupType.php | 4 ++-- Form/Type/ChoiceWithOtherType.php | 6 +++--- Form/Type/ChoicesListType.php | 2 +- Form/Type/CustomFieldType.php | 3 ++- composer.json | 4 ++-- phpunit.xml.dist | 1 + 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/DependencyInjection/ChillCustomFieldsExtension.php b/DependencyInjection/ChillCustomFieldsExtension.php index 3f5a1342c..3aaab5933 100644 --- a/DependencyInjection/ChillCustomFieldsExtension.php +++ b/DependencyInjection/ChillCustomFieldsExtension.php @@ -41,7 +41,7 @@ class ChillCustomFieldsExtension extends Extension implements PrependExtensionIn public function prepend(ContainerBuilder $container) { // add form layout to twig resources - $twigConfig['form']['resources'][] = 'ChillCustomFieldsBundle:Form:fields.html.twig'; + $twigConfig['form_themes'][] = 'ChillCustomFieldsBundle:Form:fields.html.twig'; $container->prependExtensionConfig('twig', $twigConfig); //add routes for custom bundle diff --git a/Form/CustomFieldType.php b/Form/CustomFieldType.php index 861b6c662..9636049f1 100644 --- a/Form/CustomFieldType.php +++ b/Form/CustomFieldType.php @@ -4,7 +4,7 @@ namespace Chill\CustomFieldsBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; use Chill\CustomFieldsBundle\Service\CustomFieldProvider; use Chill\CustomFieldsBundle\Entity\CustomField; use Symfony\Component\Form\FormEvent; @@ -75,7 +75,7 @@ class CustomFieldType extends AbstractType /** * @param OptionsResolverInterface $resolver */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomField' diff --git a/Form/CustomFieldsGroupType.php b/Form/CustomFieldsGroupType.php index 4ab4379ff..5efc61653 100644 --- a/Form/CustomFieldsGroupType.php +++ b/Form/CustomFieldsGroupType.php @@ -4,7 +4,7 @@ namespace Chill\CustomFieldsBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\FormEvent; @@ -88,7 +88,7 @@ class CustomFieldsGroupType extends AbstractType /** * @param OptionsResolverInterface $resolver */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( 'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup' diff --git a/Form/Type/ChoiceWithOtherType.php b/Form/Type/ChoiceWithOtherType.php index f2c061125..f6e295706 100644 --- a/Form/Type/ChoiceWithOtherType.php +++ b/Form/Type/ChoiceWithOtherType.php @@ -3,7 +3,7 @@ namespace Chill\CustomFieldsBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; /** * Return a choice widget with an "other" option @@ -38,9 +38,9 @@ class ChoiceWithOtherType extends AbstractType } /* (non-PHPdoc) - * @see \Symfony\Component\Form\AbstractType::setDefaultOptions() + * @see \Symfony\Component\Form\AbstractType::configureOptions() */ - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function configureOptions(OptionsResolver $resolver) { $resolver ->setRequired(array('choices')) diff --git a/Form/Type/ChoicesListType.php b/Form/Type/ChoicesListType.php index e45e7942d..26ad33bf5 100644 --- a/Form/Type/ChoicesListType.php +++ b/Form/Type/ChoicesListType.php @@ -63,4 +63,4 @@ class ChoicesListType extends AbstractType return 'cf_choices_list'; } -} \ No newline at end of file +} diff --git a/Form/Type/CustomFieldType.php b/Form/Type/CustomFieldType.php index 7b18d1f76..ed710ec59 100644 --- a/Form/Type/CustomFieldType.php +++ b/Form/Type/CustomFieldType.php @@ -19,6 +19,7 @@ use Chill\CustomFieldsBundle\Form\AdressType; use Chill\CustomFieldsBundle\Service\CustomFieldProvider; use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer; use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup; +use Symfony\Component\OptionsResolver\OptionsResolver; class CustomFieldType extends AbstractType { @@ -52,7 +53,7 @@ class CustomFieldType extends AbstractType } } - public function setDefaultOptions(\Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver) + public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver) { $resolver ->setRequired(array('group')) diff --git a/composer.json b/composer.json index 8f33c8621..d5b776375 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "~5.5", - "symfony/symfony": "2.5.*", + "symfony/symfony": "~2.7", "doctrine/orm": "~2.4", "doctrine/dbal" : "~2.5", "doctrine/common": "~2.4", @@ -28,7 +28,7 @@ "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~3.0", "sensio/framework-extra-bundle": "~3.0", - "chill-project/main": "*@dev", + "chill-project/main": "dev-add_acl@dev", "champs-libres/composer-bundle-migration": "~1.0", "doctrine/doctrine-migrations-bundle": "dev-master@dev", "doctrine/migrations": "~1.0@dev" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 86c84517a..309d251a0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -19,5 +19,6 @@ + \ No newline at end of file