Skip to content

Commit b3a4776

Browse files
committed
RecaptchaType and RecaptchaValidator are now deprecated
1 parent 3823a0b commit b3a4776

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Form/Type/RecaptchaType.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Symfony\Component\Form\FormView;
1717
use Symfony\Component\OptionsResolver\OptionsResolver;
1818

19+
/**
20+
* @deprecated Deprecated since version 2.2.
21+
*/
1922
class RecaptchaType extends AbstractType
2023
{
2124
const RECAPTCHA_API_SERVER = 'http://www.google.com/recaptcha/api';
@@ -29,6 +32,8 @@ class RecaptchaType extends AbstractType
2932

3033
public function __construct($publicKey, $secure, $enable, $language)
3134
{
35+
trigger_error('RecaptchaType is deprecated since 2.2 version.', E_USER_DEPRECATED);
36+
3237
$this->publicKey = $publicKey;
3338
$this->secure = $secure;
3439
$this->enable = $enable;

Validator/Constraints/RecaptchaValidator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Symfony\Component\Validator\ConstraintValidator;
1717
use Symfony\Component\Validator\Exception\ValidatorException;
1818

19+
/**
20+
* @deprecated Deprecated since version 2.2.
21+
*/
1922
class RecaptchaValidator extends ConstraintValidator
2023
{
2124
const RECAPTCHA_VERIFY_SERVER = 'www.google.com';
@@ -30,6 +33,8 @@ class RecaptchaValidator extends ConstraintValidator
3033

3134
public function __construct(RequestStack $requestStack, $privateKey, $enable)
3235
{
36+
trigger_error('RecaptchaValidator is deprecated since 2.2 version.', E_USER_DEPRECATED);
37+
3338
$this->requestStack = $requestStack;
3439
$this->privateKey = $privateKey;
3540
$this->enable = $enable;

0 commit comments

Comments
 (0)