Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 22d213b

Browse files
author
Manuele Vaccari
committed
Revert "Reduced php version from 5.6 to 5.3.9"
This reverts commit 046b96f.
1 parent 046b96f commit 22d213b

6 files changed

Lines changed: 23 additions & 25 deletions

File tree

.travis.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ cache:
1010
matrix:
1111
fast_finish: true
1212
include:
13-
- php: 5.3
14-
env: SYMFONY_VERSION=^2.8
15-
16-
- php: 5.4
17-
env: SYMFONY_VERSION=^2.8
18-
19-
- php: 5.5
20-
env: SYMFONY_VERSION=^2.8
21-
- php: 5.5
22-
env: SYMFONY_VERSION=^3
23-
2413
- php: 5.6
2514
env: SYMFONY_VERSION=^2.8
2615
- php: 5.6

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "excelwebzone/recaptcha-bundle",
33
"description": "This bundle provides easy reCAPTCHA form field integration",
4-
"keywords": ["recaptcha"],
4+
"keywords": [
5+
"recaptcha"
6+
],
57
"homepage": "https://github.com/excelwebzone/EWZRecaptchaBundle",
68
"type": "symfony-bundle",
79
"license": "MIT",
@@ -13,15 +15,15 @@
1315
}
1416
],
1517
"require": {
16-
"php": ">=5.3.9 || ^7.0",
18+
"php": ">=5.6 || ^7.0",
1719
"google/recaptcha": "^1.1",
1820
"symfony/form": "^2.8 || ^3.0 || ^4.0",
1921
"symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0",
2022
"symfony/security-bundle": "^2.8 || ^3.0 || ^4.0",
2123
"symfony/validator": "^2.8 || ^3.0 || ^4.0"
2224
},
2325
"require-dev": {
24-
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
26+
"phpunit/phpunit": "^5 || ^6 || ^7"
2527
},
2628
"autoload": {
2729
"psr-4": {

src/DependencyInjection/EWZRecaptchaExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function registerWidget(ContainerBuilder $container)
6363
private function getTwigFormResources(ContainerBuilder $container)
6464
{
6565
if (!$container->hasParameter('twig.form.resources'))
66-
return array();
66+
return [];
6767

6868
return $container->getParameter('twig.form.resources');
6969
}

src/Form/Type/EWZRecaptchaType.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace EWZ\Bundle\RecaptchaBundle\Form\Type;
44

55
use EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver;
6+
use Symfony\Component\Form\Extension\Core\Type\TextType;
67
use Symfony\Component\Form\FormInterface;
78
use Symfony\Component\Form\FormView;
89
use Symfony\Component\Form\AbstractType;
@@ -15,14 +16,14 @@ class EWZRecaptchaType extends AbstractType
1516
{
1617
/**
1718
* The reCAPTCHA server URL.
18-
*
19+
*
1920
* @var string
2021
*/
2122
protected $recaptchaApiServer;
22-
23+
2324
/**
2425
* The reCAPTCHA JS server URL.
25-
*
26+
*
2627
* @var string
2728
*/
2829
protected $recaptchaApiJsServer;
@@ -141,7 +142,7 @@ public function configureOptions(OptionsResolver $resolver)
141142
*/
142143
public function getParent()
143144
{
144-
return 'Symfony\Component\Form\Extension\Core\Type\TextType';
145+
return TextType::class;
145146
}
146147

147148
/**

tests/Form/Type/EWZRecaptchaTypeTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType;
66
use EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver;
77
use PHPUnit\Framework\TestCase;
8+
use Symfony\Component\Form\Extension\Core\Type\TextType;
9+
use Symfony\Component\Form\FormInterface;
810
use Symfony\Component\Form\FormView;
11+
use Symfony\Component\HttpFoundation\RequestStack;
912
use Symfony\Component\OptionsResolver\OptionsResolver;
1013

1114
class EWZRecaptchaTypeTest extends TestCase
@@ -15,7 +18,7 @@ class EWZRecaptchaTypeTest extends TestCase
1518

1619
protected function setUp()
1720
{
18-
$requestStack = $this->createMock('Symfony\Component\HttpFoundation\RequestStack');
21+
$requestStack = $this->createMock(RequestStack::class);
1922
$localeResolver = new LocaleResolver('de', false, $requestStack);
2023
$this->type = new EWZRecaptchaType('key', true, true, $localeResolver, 'www.google.com');
2124
}
@@ -27,7 +30,8 @@ public function buildView()
2730
{
2831
$view = new FormView();
2932

30-
$form = $this->createMock('Symfony\Component\Form\FormInterface');
33+
/** @var FormInterface $form */
34+
$form = $this->createMock(FormInterface::class);
3135

3236
$this->assertArrayNotHasKey('ewz_recaptcha_enabled', $view->vars);
3337
$this->assertArrayNotHasKey('ewz_recaptcha_ajax', $view->vars);
@@ -43,7 +47,7 @@ public function buildView()
4347
*/
4448
public function getParent()
4549
{
46-
$this->assertSame('Symfony\Component\Form\Extension\Core\Type\TextType', $this->type->getParent());
50+
$this->assertSame(TextType::class, $this->type->getParent());
4751
}
4852

4953
/**

tests/Locale/LocaleResolverTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver;
66
use PHPUnit\Framework\TestCase;
7+
use Symfony\Component\HttpFoundation\Request;
8+
use Symfony\Component\HttpFoundation\RequestStack;
79

810
class LocaleResolverTest extends TestCase
911
{
@@ -12,10 +14,10 @@ class LocaleResolverTest extends TestCase
1214
*/
1315
public function resolveWithLocaleFromRequest()
1416
{
15-
$request = $this->createMock('Symfony\Component\HttpFoundation\Request');
17+
$request = $this->createMock(Request::class);
1618
$request->expects($this->once())->method('getLocale');
1719

18-
$requestStack = $this->createMock('Symfony\Component\HttpFoundation\RequestStack');
20+
$requestStack = $this->createMock(RequestStack::class);
1921
$requestStack
2022
->expects($this->once())
2123
->method('getCurrentRequest')
@@ -30,7 +32,7 @@ public function resolveWithLocaleFromRequest()
3032
*/
3133
public function resolveWithDefaultLocale()
3234
{
33-
$requestStack = $this->createMock('Symfony\Component\HttpFoundation\RequestStack');
35+
$requestStack = $this->createMock(RequestStack::class);
3436
$requestStack
3537
->expects($this->never())
3638
->method('getCurrentRequest');

0 commit comments

Comments
 (0)