Skip to content

Commit

Permalink
Merge pull request #37 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 3a7400f + 495148c commit d1a091a
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 22 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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"psr/http-message": "^1.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5.13 || ^9.3.8",
"slim/psr7": "^1.1",
"phpunit/phpunit": "^8.5",
"squizlabs/php_codesniffer": "^3.5",
"phpstan/phpstan": "^0.12.28"
},
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">
<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>
<logging />
</phpunit>
2 changes: 1 addition & 1 deletion src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Slim Framework (https://www.slimframework.com)
*
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
*/

declare(strict_types=1);
Expand Down
2 changes: 1 addition & 1 deletion src/CacheProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Slim Framework (https://www.slimframework.com)
*
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
*/

declare(strict_types=1);
Expand Down
3 changes: 1 addition & 2 deletions tests/CacheProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
/**
* Slim Framework (https://www.slimframework.com)
*
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
*/

declare(strict_types=1);

namespace Slim\HttpCache\Tests;

use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;
use Slim\HttpCache\CacheProvider;
use Slim\Psr7\Factory\ResponseFactory;
Expand Down
3 changes: 1 addition & 2 deletions tests/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
/**
* Slim Framework (https://www.slimframework.com)
*
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
*/

declare(strict_types=1);

namespace Slim\HttpCache\Tests;

use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
Expand Down
16 changes: 16 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Slim Framework (https://www.slimframework.com)
*
* @license https://github.com/slimphp/Slim-HttpCache/blob/master/LICENSE.md (MIT License)
*/

declare(strict_types=1);

namespace Slim\HttpCache\Tests;

use PHPUnit\Framework\TestCase as PhpUnitTestCase;

abstract class TestCase extends PhpUnitTestCase
{
}

0 comments on commit d1a091a

Please sign in to comment.