Skip to content

Commit 9ceaff0

Browse files
authored
Merge pull request #204 from slimphp/php8-support
PHP 8 Support
2 parents 9ad5167 + 4d26870 commit 9ceaff0

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^7.2",
21+
"php": "^7.2 || ^8.0",
2222
"psr/http-message": "^1.0",
2323
"slim/slim": "^4.7",
2424
"twig/twig": "^3.1"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^8.5",
27+
"phpunit/phpunit": "^8.5.13 || ^9.3.8",
28+
"phpstan/phpstan": "^0.12.58",
2829
"psr/http-factory": "^1.0",
2930
"squizlabs/php_codesniffer": "^3.5",
30-
"phpstan/phpstan": "^0.12.58"
31+
"weirdan/prophecy-shim": "^1.0 || ^2.0.2"
3132
},
3233
"autoload": {
3334
"psr-4": {

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+
<logging />
23+
<coverage processUncoveredFiles="true">
24+
<include>
2425
<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>
26+
</include>
27+
<report>
28+
<html outputDirectory="./coverage" lowUpperBound="20" highLowerBound="50"/>
29+
</report>
30+
</coverage>
3531
</phpunit>

tests/TestCase.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99

1010
namespace Slim\Tests;
1111

12+
use Prophecy\PhpUnit\ProphecyTrait;
1213
use PHPUnit\Framework\TestCase as PhpUnitTestCase;
1314
use ReflectionProperty;
1415

1516
abstract class TestCase extends PhpUnitTestCase
1617
{
18+
use ProphecyTrait;
19+
1720
protected function assertInaccessiblePropertySame($expected, $obj, string $name)
1821
{
1922
$prop = new ReflectionProperty(get_class($obj), $name);

0 commit comments

Comments
 (0)