Skip to content

Commit

Permalink
Merge pull request #204 from slimphp/php8-support
Browse files Browse the repository at this point in the history
PHP 8 Support
  • Loading branch information
l0gicgate authored Dec 8, 2020
2 parents 9ad5167 + 4d26870 commit 9ceaff0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: php

dist: trusty

matrix:
Expand All @@ -9,6 +8,7 @@ matrix:
- php: 7.4
env: ANALYSIS='true'
- php: nightly

allow_failures:
- php: nightly

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"psr/http-message": "^1.0",
"slim/slim": "^4.7",
"twig/twig": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^8.5.13 || ^9.3.8",
"phpstan/phpstan": "^0.12.58",
"psr/http-factory": "^1.0",
"squizlabs/php_codesniffer": "^3.5",
"phpstan/phpstan": "^0.12.58"
"weirdan/prophecy-shim": "^1.0 || ^2.0.2"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 9 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="true"
Expand All @@ -19,17 +19,13 @@
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<logging />
<coverage processUncoveredFiles="true">
<include>
<directory>./src/</directory>
</whitelist>
</filter>
<logging>
<log
type="coverage-html"
target="./coverage"
lowUpperBound="20"
highLowerBound="50"
/>
</logging>
</include>
<report>
<html outputDirectory="./coverage" lowUpperBound="20" highLowerBound="50"/>
</report>
</coverage>
</phpunit>
3 changes: 3 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

namespace Slim\Tests;

use Prophecy\PhpUnit\ProphecyTrait;
use PHPUnit\Framework\TestCase as PhpUnitTestCase;
use ReflectionProperty;

abstract class TestCase extends PhpUnitTestCase
{
use ProphecyTrait;

protected function assertInaccessiblePropertySame($expected, $obj, string $name)
{
$prop = new ReflectionProperty(get_class($obj), $name);
Expand Down

0 comments on commit 9ceaff0

Please sign in to comment.