Skip to content

Commit

Permalink
Merge pull request #100 from mmoreram/updated-dependency-and-travis
Browse files Browse the repository at this point in the history
Updated dependency and travis
  • Loading branch information
mmoreram authored Nov 18, 2016
2 parents 023326f + a7f7683 commit d79de19
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 27 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@ language: php

sudo: false

php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

matrix:
include:
- php: 5.4
- php: 5.6
env: COMPOSER_OPTIONS="--prefer-lowest"
- php: 5.4
- php: 5.6
env: $SYMFONY_VERSION="^2.8.0"
- php: 5.5.9
- php: 7.0
env: $SYMFONY_VERSION="^3.0.0"
- php: 7.1
env: $SYMFONY_VERSION="^3.1.0"
- php: 5.6
env: $SYMFONY_VERSION="^3.1.0"

before_install:
- 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi;'
Expand Down
2 changes: 1 addition & 1 deletion Annotation/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Entity extends Annotation
/**
* @var string
*
* Namespace of entity in a short namespace mode.
* Namespace of entity in a short namespace mode
*/
public $class;

Expand Down
2 changes: 1 addition & 1 deletion Annotation/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Form extends Annotation
* @var validate
*
* Validates submited form if Request is handled.
* Name of field to set result.
* Name of field to set result
*/
public $validate = false;

Expand Down
4 changes: 2 additions & 2 deletions Provider/EntityProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public function evaluateEntityInstanceFactory(array $class)
: $this->defaultFactoryMethod;

$factoryStatic = isset($class['static'])
? (boolean) $class['static']
: (boolean) $this->defaultFactoryStatic;
? (bool) $class['static']
: (bool) $this->defaultFactoryStatic;

$factory = class_exists($factoryClass)
? (
Expand Down
2 changes: 1 addition & 1 deletion Resolver/EntityAnnotationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function evaluateMapping(AnnotationEntity $annotation, $entity)
}

$mapping[$mappingKey] = $parameterValue;
};
}

$entityClass = get_class($entity);
$instance = $this
Expand Down
2 changes: 1 addition & 1 deletion Resolver/Paginator/PaginatorWheresEvaluator.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function evaluate(

$whereValue = $this->addWildcards($annotationWhereParameter, $whereValue);

$optionalFilter = (boolean) isset($where[4])
$optionalFilter = (bool) isset($where[4])
? $where[4]
: false;

Expand Down
12 changes: 6 additions & 6 deletions Tests/UnitTest/Resolver/FormAnnotationResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@

namespace Mmoreram\ControllerExtraBundle\Tests\UnitTest\Resolver;

use Mmoreram\ControllerExtraBundle\Annotation\Form;
use Mmoreram\ControllerExtraBundle\Resolver\FormAnnotationResolver;
use Mmoreram\ControllerExtraBundle\Tests\FakeBundle\Form\Type\FakeType;
use PHPUnit_Framework_TestCase;
use ReflectionMethod;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormRegistryInterface;
use Symfony\Component\HttpFoundation\Request;

use Mmoreram\ControllerExtraBundle\Annotation\Abstracts\Annotation;
use Mmoreram\ControllerExtraBundle\Annotation\Form;
use Mmoreram\ControllerExtraBundle\Resolver\FormAnnotationResolver;
use Mmoreram\ControllerExtraBundle\Tests\FakeBundle\Form\Type\FakeType;

/**
* Tests FormAnnotationResolver class.
Expand Down Expand Up @@ -72,8 +72,8 @@ class FormAnnotationResolverTest extends PHPUnit_Framework_TestCase
*/
public function setUp()
{
$this->formRegistry = $this->getMock('Symfony\Component\Form\FormRegistryInterface');
$this->formFactory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
$this->formRegistry = $this->createMock('Symfony\Component\Form\FormRegistryInterface');
$this->formFactory = $this->createMock('Symfony\Component\Form\FormFactoryInterface');

$requestParameterProvider = $this
->getMockBuilder('Mmoreram\ControllerExtraBundle\Provider\RequestParameterProvider')
Expand Down Expand Up @@ -114,7 +114,7 @@ public function setUp()
*/
public function testFQDNUsesFormRegistry()
{
$resolvedFormTypeInterface = $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface');
$resolvedFormTypeInterface = $this->createMock('Symfony\Component\Form\ResolvedFormTypeInterface');
$resolvedFormTypeInterface->method('getInnerType')->willReturn(new FakeType());

$class = 'Mmoreram\ControllerExtraBundle\Tests\FakeBundle\Form\Type\FakeType';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private function getResolver($defaultName = 'test', $defaultPage = 1, $defaultLi
->disableOriginalConstructor()
->getMock();

$evaluator = $this->getMock('Mmoreram\ControllerExtraBundle\Resolver\Paginator\PaginatorEvaluatorCollector');
$evaluator = $this->createMock('Mmoreram\ControllerExtraBundle\Resolver\Paginator\PaginatorEvaluatorCollector');

return new PaginatorAnnotationResolver(
$doctrine,
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
],
"require": {
"php": "^5.4|^7.0",
"php": ">=5.6",
"doctrine/common": "^2.5",
"symfony/config": "^2.8|^3.0",
"symfony/http-kernel": "^2.8|^3.0",
Expand All @@ -44,9 +44,9 @@
"pagerfanta/pagerfanta": "~1.0",
"knplabs/knp-paginator-bundle": "~2.5.1",

"phpunit/phpunit": "4.8.19",
"fabpot/php-cs-fixer": "1.11",
"mmoreram/php-formatter": "1.1.0"
"phpunit/phpunit": "^5.6.4",
"friendsofphp/php-cs-fixer": "^1.12.4",
"mmoreram/php-formatter": "^1.1.0"
},
"suggest": {
"symfony/monolog-bundle": "To use the @Log annotation",
Expand Down

0 comments on commit d79de19

Please sign in to comment.