Closed wadjeroudi closed 9 years ago
This has broken the tests. Also, changing the default value may affect some applications.
Ok, I understand.
For those who need to change this behavior, juste redefine the form type ckeditor:
<?php
namespace AppBundle\Form\Type;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use \Trsteel\CkeditorBundle\Form\Type\CkeditorType as BaseCkeditorType;
/**
* Class CkeditorType
* @package AppBundle\Form\Type
*/
class CkeditorType extends BaseCkeditorType
{
/**
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
/** @var OptionsResolver $resolver */
$defaultRequired = $resolver->hasDefault('required');
parent::setDefaultOptions($resolver);
$resolver->setDefault('required', $defaultRequired);
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$defaultRequired = $resolver->hasDefault('required');
parent::configureOptions($resolver);
$resolver->setDefault('required', $defaultRequired);
}
}
The default required value should not be false and let the guesser auto guesses. Linked to #74.