diff --git a/.travis.yml b/.travis.yml index c1fa2f8a..f988aa46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,22 +2,31 @@ language: php php: - 7.0 + - 7.1 - hhvm + - nightly + +env: + matrix: + - DEPENDENCIES="high" + - DEPENDENCIES="low" matrix: allow_failures: - php: hhvm + - php: nightly before_script: - - composer self-update - - composer update --prefer-source --dev + - if [ "$DEPENDENCIES" = "high" ]; then composer --prefer-source update; fi; + - if [ "$DEPENDENCIES" = "low" ]; then composer --prefer-lowest --prefer-source update; fi; script: - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml --exclude-group Functional - ./vendor/bin/phpunit --group=Functional - php -n ./vendor/bin/phpbench run --report=aggregate --revs=500 --iterations=50 --warmup=3 - - ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/ ./benchmarks + # Only run the code standards with the latest package + - if [ "$DEPENDENCIES" = "high" ]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/ ./benchmarks; fi; after_script: - if [[ $TRAVIS_PHP_VERSION = '7.0' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi - - if [[ $TRAVIS_PHP_VERSION = '7.0' ]]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi \ No newline at end of file + - if [[ $TRAVIS_PHP_VERSION = '7.0' ]]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi diff --git a/composer.json b/composer.json index d16944c7..b13adc62 100644 --- a/composer.json +++ b/composer.json @@ -20,16 +20,17 @@ ], "require": { "php": "~7.0", - "nikic/php-parser": "~2.0", - "ocramius/code-generator-utils": "0.4.*", + "nikic/php-parser": "~2.0|~3.0", + "ocramius/code-generator-utils": "~0.4", "zendframework/zend-hydrator": "^2.0" }, "require-dev": { - "phpunit/phpunit": "~5.0", - "squizlabs/php_codesniffer": "~2.0", + "phpunit/phpunit": "^5.7.21", + "squizlabs/php_codesniffer": "^3.0", "phpbench/phpbench": "^0.13.0", "zendframework/zend-filter": "^2.7", - "zendframework/zend-servicemanager": "^3.2" + "zendframework/zend-servicemanager": "^3.2", + "zendframework/zend-stdlib": "^3.1" }, "autoload": { "psr-0": { diff --git a/tests/GeneratedHydratorTest/Factory/HydratorFactoryTest.php b/tests/GeneratedHydratorTest/Factory/HydratorFactoryTest.php index 04c88a1b..63863b37 100644 --- a/tests/GeneratedHydratorTest/Factory/HydratorFactoryTest.php +++ b/tests/GeneratedHydratorTest/Factory/HydratorFactoryTest.php @@ -137,24 +137,24 @@ public function testWillTryAutoGeneration() return true; }); - $this + $this ->inflector ->expects(self::once()) ->method('getGeneratedClassName') ->with('GeneratedHydratorTestAsset\\BaseClass') ->will(self::returnValue($generatedClassName)); - $this + $this ->inflector ->expects(self::once()) ->method('getUserClassName') ->with($className) ->will(self::returnValue('GeneratedHydratorTestAsset\\BaseClass')); - $factory = new HydratorFactory($this->config); + $factory = new HydratorFactory($this->config); /* @var $generatedClass \GeneratedHydratorTestAsset\LazyLoadingMock */ - $generatedClass = $factory->getHydratorClass(); + $generatedClass = $factory->getHydratorClass(); - self::assertInstanceOf($generatedClassName, new $generatedClass); + self::assertInstanceOf($generatedClassName, new $generatedClass); } }