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

Commit 046b96f

Browse files
author
Manuele Vaccari
committed
Reduced php version from 5.6 to 5.3.9
1 parent 8f4f3c1 commit 046b96f

6 files changed

Lines changed: 25 additions & 23 deletions

File tree

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ 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+
1324
- php: 5.6
1425
env: SYMFONY_VERSION=^2.8
1526
- php: 5.6

composer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "excelwebzone/recaptcha-bundle",
33
"description": "This bundle provides easy reCAPTCHA form field integration",
4-
"keywords": [
5-
"recaptcha"
6-
],
4+
"keywords": ["recaptcha"],
75
"homepage": "https://github.com/excelwebzone/EWZRecaptchaBundle",
86
"type": "symfony-bundle",
97
"license": "MIT",
@@ -15,15 +13,15 @@
1513
}
1614
],
1715
"require": {
18-
"php": ">=5.6 || ^7.0",
16+
"php": ">=5.3.9 || ^7.0",
1917
"google/recaptcha": "^1.1",
2018
"symfony/form": "^2.8 || ^3.0 || ^4.0",
2119
"symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0",
2220
"symfony/security-bundle": "^2.8 || ^3.0 || ^4.0",
2321
"symfony/validator": "^2.8 || ^3.0 || ^4.0"
2422
},
2523
"require-dev": {
26-
"phpunit/phpunit": "^5 || ^6 || ^7"
24+
"phpunit/phpunit": "^4 || ^5 || ^6 || ^7"
2725
},
2826
"autoload": {
2927
"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 [];
66+
return array();
6767

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

src/Form/Type/EWZRecaptchaType.php

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

55
use EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver;
6-
use Symfony\Component\Form\Extension\Core\Type\TextType;
76
use Symfony\Component\Form\FormInterface;
87
use Symfony\Component\Form\FormView;
98
use Symfony\Component\Form\AbstractType;
@@ -16,14 +15,14 @@ class EWZRecaptchaType extends AbstractType
1615
{
1716
/**
1817
* The reCAPTCHA server URL.
19-
*
18+
*
2019
* @var string
2120
*/
2221
protected $recaptchaApiServer;
23-
22+
2423
/**
2524
* The reCAPTCHA JS server URL.
26-
*
25+
*
2726
* @var string
2827
*/
2928
protected $recaptchaApiJsServer;
@@ -142,7 +141,7 @@ public function configureOptions(OptionsResolver $resolver)
142141
*/
143142
public function getParent()
144143
{
145-
return TextType::class;
144+
return 'Symfony\Component\Form\Extension\Core\Type\TextType';
146145
}
147146

148147
/**

tests/Form/Type/EWZRecaptchaTypeTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
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;
108
use Symfony\Component\Form\FormView;
11-
use Symfony\Component\HttpFoundation\RequestStack;
129
use Symfony\Component\OptionsResolver\OptionsResolver;
1310

1411
class EWZRecaptchaTypeTest extends TestCase
@@ -18,7 +15,7 @@ class EWZRecaptchaTypeTest extends TestCase
1815

1916
protected function setUp()
2017
{
21-
$requestStack = $this->createMock(RequestStack::class);
18+
$requestStack = $this->createMock('Symfony\Component\HttpFoundation\RequestStack');
2219
$localeResolver = new LocaleResolver('de', false, $requestStack);
2320
$this->type = new EWZRecaptchaType('key', true, true, $localeResolver, 'www.google.com');
2421
}
@@ -30,8 +27,7 @@ public function buildView()
3027
{
3128
$view = new FormView();
3229

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

3632
$this->assertArrayNotHasKey('ewz_recaptcha_enabled', $view->vars);
3733
$this->assertArrayNotHasKey('ewz_recaptcha_ajax', $view->vars);
@@ -47,7 +43,7 @@ public function buildView()
4743
*/
4844
public function getParent()
4945
{
50-
$this->assertSame(TextType::class, $this->type->getParent());
46+
$this->assertSame('Symfony\Component\Form\Extension\Core\Type\TextType', $this->type->getParent());
5147
}
5248

5349
/**

tests/Locale/LocaleResolverTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
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;
97

108
class LocaleResolverTest extends TestCase
119
{
@@ -14,10 +12,10 @@ class LocaleResolverTest extends TestCase
1412
*/
1513
public function resolveWithLocaleFromRequest()
1614
{
17-
$request = $this->createMock(Request::class);
15+
$request = $this->createMock('Symfony\Component\HttpFoundation\Request');
1816
$request->expects($this->once())->method('getLocale');
1917

20-
$requestStack = $this->createMock(RequestStack::class);
18+
$requestStack = $this->createMock('Symfony\Component\HttpFoundation\RequestStack');
2119
$requestStack
2220
->expects($this->once())
2321
->method('getCurrentRequest')
@@ -32,7 +30,7 @@ public function resolveWithLocaleFromRequest()
3230
*/
3331
public function resolveWithDefaultLocale()
3432
{
35-
$requestStack = $this->createMock(RequestStack::class);
33+
$requestStack = $this->createMock('Symfony\Component\HttpFoundation\RequestStack');
3634
$requestStack
3735
->expects($this->never())
3836
->method('getCurrentRequest');

0 commit comments

Comments
 (0)