mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 14:24:24 +00:00
move to symfony 2.7 + implements acl
merge of branch add_acl Squashed commit of the following: commit b112df16e568ad4a305e290b4cca9eb696bcf5d7 Merge: f8c44ca 11324cb Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Tue Jun 30 09:59:03 2015 +0200 Merge remote-tracking branch 'origin/master' into add_acl commit f8c44ca20b5a53fb18da00ab265d626dd8c770b2 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Fri Jun 5 22:47:50 2015 +0200 fix Form signature to match abstractForm OptionsResolverInterface => OptionsResolver commit 586155ecfa85240d683aa8bd37493e948f89cd67 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Fri Jun 5 22:47:25 2015 +0200 remove deprecation warnings from phpunit commit 6ada3ddef336b958a886215fcdb040a29f5a411f Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Fri Jun 5 22:30:30 2015 +0200 replace deprecated setDefaultOptions setdefaultsOptions => configureOptions commit 28b0e258d52b08ecd3799e19b15bd4b1f1e58f83 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Fri Jun 5 11:20:30 2015 +0200 fix twig.form.resources deprecations commit cb09035c8f0eb74192f7e3e68c93c6378f158f2f Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Fri Jun 5 10:58:19 2015 +0200 switch to symfony 2.7 [ci skip]
This commit is contained in:
parent
11324cb834
commit
408c774e53
@ -41,7 +41,7 @@ class ChillCustomFieldsExtension extends Extension implements PrependExtensionIn
|
|||||||
public function prepend(ContainerBuilder $container)
|
public function prepend(ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
// add form layout to twig resources
|
// 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);
|
$container->prependExtensionConfig('twig', $twigConfig);
|
||||||
|
|
||||||
//add routes for custom bundle
|
//add routes for custom bundle
|
||||||
|
@ -4,7 +4,7 @@ namespace Chill\CustomFieldsBundle\Form;
|
|||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
||||||
use Chill\CustomFieldsBundle\Entity\CustomField;
|
use Chill\CustomFieldsBundle\Entity\CustomField;
|
||||||
use Symfony\Component\Form\FormEvent;
|
use Symfony\Component\Form\FormEvent;
|
||||||
@ -75,7 +75,7 @@ class CustomFieldType extends AbstractType
|
|||||||
/**
|
/**
|
||||||
* @param OptionsResolverInterface $resolver
|
* @param OptionsResolverInterface $resolver
|
||||||
*/
|
*/
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
$resolver->setDefaults(array(
|
$resolver->setDefaults(array(
|
||||||
'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomField'
|
'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomField'
|
||||||
|
@ -4,7 +4,7 @@ namespace Chill\CustomFieldsBundle\Form;
|
|||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Translation\TranslatorInterface;
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
use Symfony\Component\Form\FormEvents;
|
use Symfony\Component\Form\FormEvents;
|
||||||
use Symfony\Component\Form\FormEvent;
|
use Symfony\Component\Form\FormEvent;
|
||||||
@ -88,7 +88,7 @@ class CustomFieldsGroupType extends AbstractType
|
|||||||
/**
|
/**
|
||||||
* @param OptionsResolverInterface $resolver
|
* @param OptionsResolverInterface $resolver
|
||||||
*/
|
*/
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
{
|
{
|
||||||
$resolver->setDefaults(array(
|
$resolver->setDefaults(array(
|
||||||
'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup'
|
'data_class' => 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup'
|
||||||
|
@ -3,7 +3,7 @@ namespace Chill\CustomFieldsBundle\Form\Type;
|
|||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a choice widget with an "other" option
|
* Return a choice widget with an "other" option
|
||||||
@ -38,9 +38,9 @@ class ChoiceWithOtherType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* (non-PHPdoc)
|
/* (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
|
$resolver
|
||||||
->setRequired(array('choices'))
|
->setRequired(array('choices'))
|
||||||
|
@ -63,4 +63,4 @@ class ChoicesListType extends AbstractType
|
|||||||
return 'cf_choices_list';
|
return 'cf_choices_list';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ use Chill\CustomFieldsBundle\Form\AdressType;
|
|||||||
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
||||||
use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
|
use Chill\CustomFieldsBundle\Form\DataTransformer\CustomFieldDataTransformer;
|
||||||
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
|
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
class CustomFieldType extends AbstractType
|
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
|
$resolver
|
||||||
->setRequired(array('group'))
|
->setRequired(array('group'))
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~5.5",
|
"php": "~5.5",
|
||||||
"symfony/symfony": "2.5.*",
|
"symfony/symfony": "~2.7",
|
||||||
"doctrine/orm": "~2.4",
|
"doctrine/orm": "~2.4",
|
||||||
"doctrine/dbal" : "~2.5",
|
"doctrine/dbal" : "~2.5",
|
||||||
"doctrine/common": "~2.4",
|
"doctrine/common": "~2.4",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"symfony/monolog-bundle": "~2.4",
|
"symfony/monolog-bundle": "~2.4",
|
||||||
"sensio/distribution-bundle": "~3.0",
|
"sensio/distribution-bundle": "~3.0",
|
||||||
"sensio/framework-extra-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",
|
"champs-libres/composer-bundle-migration": "~1.0",
|
||||||
"doctrine/doctrine-migrations-bundle": "dev-master@dev",
|
"doctrine/doctrine-migrations-bundle": "dev-master@dev",
|
||||||
"doctrine/migrations": "~1.0@dev"
|
"doctrine/migrations": "~1.0@dev"
|
||||||
|
@ -19,5 +19,6 @@
|
|||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
<server name="KERNEL_DIR" value="/Tests/Fixtures/App/app/" />
|
<server name="KERNEL_DIR" value="/Tests/Fixtures/App/app/" />
|
||||||
|
<ini name="error_reporting" value="-16385"/>
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
Loading…
x
Reference in New Issue
Block a user