Skip to content

Commit

Permalink
Merge pull request #21 from Roave/enable-support-for-php72
Browse files Browse the repository at this point in the history
Added build for PHP 7.2 to Travis
  • Loading branch information
Ocramius authored Jan 30, 2018
2 parents c787d27 + 674a8d7 commit 431f119
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: php

php:
- 7.1
- 7.2

env:
matrix:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"description": "Doctrine Cache adapter for PSR-16 Simple Cache",
"type": "library",
"require": {
"php": "~7.1.0",
"php": "~7.1.0 || ~7.2.0",
"doctrine/cache": "^1.7",
"psr/simple-cache": "^1.0"
},
"require-dev": {
"cache/integration-tests": "^0.15.0",
"cache/integration-tests": "dev-master#ff86c07073a5d6b7a7fe9019dd4f6d8fdaaca5ea",
"cache/tag-interop": "^1.0@dev",
"phpunit/phpunit": "^5.7",
"phpunit/phpunit": "^6.5",
"humbug/humbug": "~1.0@dev"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleCacheAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private function validateKey($key) : void
private function filterValidateMultipleKeys($keys) : array
{
if ($keys instanceof \Traversable) {
$keys = iterator_to_array($keys);
$keys = iterator_to_array($keys, false);
}

if (!is_array($keys)) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/CacheIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ protected function setUp() : void
$this->skippedTests['testObjectDoesNotChangeInCache'] = true;

// https://github.com/php-cache/integration-tests/pull/74/files
$this->skippedTests['testSetMultiple'] = true;
$this->skippedTests['testSetMultipleWithIntegerArrayKey'] = true;
}
}
3 changes: 2 additions & 1 deletion test/unit/Exception/CacheExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
namespace RoaveTest\DoctrineSimpleCache\Exception;

use Doctrine\Common\Cache\Cache as DoctrineCache;
use PHPUnit\Framework\TestCase;
use Psr\SimpleCache\CacheException as PsrCacheException;
use Roave\DoctrineSimpleCache\Exception\CacheException;

/**
* @covers \Roave\DoctrineSimpleCache\Exception\CacheException
*/
final class CacheExceptionTest extends \PHPUnit_Framework_TestCase
final class CacheExceptionTest extends TestCase
{
public function testFromNonClearableCache()
{
Expand Down
3 changes: 2 additions & 1 deletion test/unit/Exception/InvalidArgumentExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
namespace RoaveTest\DoctrineSimpleCache\Exception;

use Roave\DoctrineSimpleCache\Exception\InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use Psr\SimpleCache\InvalidArgumentException as PsrInvalidArgumentException;

/**
* @covers \Roave\DoctrineSimpleCache\Exception\InvalidArgumentException
*/
final class InvalidArgumentExceptionTest extends \PHPUnit_Framework_TestCase
final class InvalidArgumentExceptionTest extends TestCase
{
public function testFromKeyAndInvalidTTLObject()
{
Expand Down
3 changes: 2 additions & 1 deletion test/unit/SimpleCacheAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace RoaveTest\DoctrineSimpleCache;

use Doctrine\Common\Cache\ArrayCache;
use PHPUnit\Framework\TestCase;
use Roave\DoctrineSimpleCache\Exception\CacheException;
use Roave\DoctrineSimpleCache\Exception\InvalidArgumentException;
use Roave\DoctrineSimpleCache\SimpleCacheAdapter;
Expand All @@ -14,7 +15,7 @@
/**
* @covers \Roave\DoctrineSimpleCache\SimpleCacheAdapter
*/
final class SimpleCacheAdapterTest extends \PHPUnit_Framework_TestCase
final class SimpleCacheAdapterTest extends TestCase
{
public function invalidTTLs() : array
{
Expand Down

0 comments on commit 431f119

Please sign in to comment.