Skip to content

Commit d1a091a

Browse files
authored
Merge pull request #37 from slimphp/php8-support
PHP 8 Support
2 parents 3a7400f + 495148c commit d1a091a

File tree

8 files changed

+32
-22
lines changed

8 files changed

+32
-22
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
language: php
2-
32
dist: trusty
43

54
matrix:
@@ -9,6 +8,7 @@ matrix:
98
- php: 7.4
109
env: ANALYSIS='true'
1110
- php: nightly
11+
1212
allow_failures:
1313
- php: nightly
1414

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^7.2",
21+
"php": "^7.2 || ^8.0",
2222
"psr/http-message": "^1.0",
2323
"psr/http-server-middleware": "^1.0"
2424
},
2525
"require-dev": {
26+
"phpunit/phpunit": "^8.5.13 || ^9.3.8",
2627
"slim/psr7": "^1.1",
27-
"phpunit/phpunit": "^8.5",
2828
"squizlabs/php_codesniffer": "^3.5",
2929
"phpstan/phpstan": "^0.12.28"
3030
},

phpunit.xml.dist

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
44
backupGlobals="false"
55
backupStaticAttributes="false"
66
beStrictAboutTestsThatDoNotTestAnything="true"
@@ -19,17 +19,13 @@
1919
<directory>./tests/</directory>
2020
</testsuite>
2121
</testsuites>
22-
<filter>
23-
<whitelist processUncoveredFilesFromWhitelist="true">
22+
<coverage processUncoveredFiles="true">
23+
<include>
2424
<directory>./src/</directory>
25-
</whitelist>
26-
</filter>
27-
<logging>
28-
<log
29-
type="coverage-html"
30-
target="./coverage"
31-
lowUpperBound="20"
32-
highLowerBound="50"
33-
/>
34-
</logging>
25+
</include>
26+
<report>
27+
<html outputDirectory="./coverage" lowUpperBound="20" highLowerBound="50"/>
28+
</report>
29+
</coverage>
30+
<logging />
3531
</phpunit>

src/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Slim Framework (https://www.slimframework.com)
44
*
5-
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
5+
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
66
*/
77

88
declare(strict_types=1);

src/CacheProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Slim Framework (https://www.slimframework.com)
44
*
5-
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
5+
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
66
*/
77

88
declare(strict_types=1);

tests/CacheProviderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
/**
33
* Slim Framework (https://www.slimframework.com)
44
*
5-
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
5+
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
66
*/
77

88
declare(strict_types=1);
99

1010
namespace Slim\HttpCache\Tests;
1111

1212
use InvalidArgumentException;
13-
use PHPUnit\Framework\TestCase;
1413
use Psr\Http\Message\ResponseInterface;
1514
use Slim\HttpCache\CacheProvider;
1615
use Slim\Psr7\Factory\ResponseFactory;

tests/CacheTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
/**
33
* Slim Framework (https://www.slimframework.com)
44
*
5-
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
5+
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
66
*/
77

88
declare(strict_types=1);
99

1010
namespace Slim\HttpCache\Tests;
1111

12-
use PHPUnit\Framework\TestCase;
1312
use Psr\Http\Message\ResponseInterface;
1413
use Psr\Http\Message\ServerRequestInterface;
1514
use Psr\Http\Server\RequestHandlerInterface;

tests/TestCase.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* Slim Framework (https://www.slimframework.com)
4+
*
5+
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
6+
*/
7+
8+
declare(strict_types=1);
9+
10+
namespace Slim\HttpCache\Tests;
11+
12+
use PHPUnit\Framework\TestCase as PhpUnitTestCase;
13+
14+
abstract class TestCase extends PhpUnitTestCase
15+
{
16+
}

0 commit comments

Comments
 (0)