Getting compatible with php>=5.3.9
This commit is contained in:
parent
e10494a767
commit
42cb26794d
|
@ -105,6 +105,8 @@ You can use the "captcha" type in your forms this way:
|
|||
use Gregwar\CaptchaBundle\Type\CaptchaType;
|
||||
// ...
|
||||
$builder->add('captcha', CaptchaType::class); // That's all !
|
||||
// If you're using php<5.5, you can use instead:
|
||||
$builder->add('captcha', 'Gregwar\CaptchaBundle\Type\CaptchaType');
|
||||
// ...
|
||||
```
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
|
||||
use Gregwar\CaptchaBundle\Validator\CaptchaValidator;
|
||||
use Gregwar\CaptchaBundle\Generator\CaptchaGenerator;
|
||||
|
@ -144,7 +143,8 @@ class CaptchaType extends AbstractType
|
|||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return TextType::class;
|
||||
// Not using ::class to support Symfony 2.8 w/ php<5.5
|
||||
return 'Symfony\Component\Form\Extension\Core\Type\TextType';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5.0",
|
||||
"php": ">=5.3.9",
|
||||
"gregwar/captcha": "~1.1",
|
||||
"symfony/framework-bundle": "~2.1|~3.0",
|
||||
"symfony/form": "~2.1|~3.0"
|
||||
|
|
Loading…
Reference in New Issue