From 9324854741ce1fd5a73cad4cc5c69bc0f3883eac Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Sat, 5 Dec 2020 17:07:04 -0300 Subject: [PATCH 01/10] :tada: php8.0 --- Dockerfile | 7 +++++++ composer.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..31cd460 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM php:8.0-cli +RUN apt-get update && apt-get install -y apt-utils zip unzip +# Get latest Composer +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer +COPY . /usr/src/slim-http-cache +WORKDIR /usr/src/slim-http-cache +CMD [ "php" ] \ No newline at end of file diff --git a/composer.json b/composer.json index bea90df..616f677 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2 | ^8.0", "psr/http-message": "^1.0", "psr/http-server-middleware": "^1.0" }, From 8debf9944842b2c258d1863e1fe64037eeb16f17 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Sat, 5 Dec 2020 20:19:12 -0300 Subject: [PATCH 02/10] :tada: php8.0 --- Dockerfile | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 31cd460..0000000 --- a/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM php:8.0-cli -RUN apt-get update && apt-get install -y apt-utils zip unzip -# Get latest Composer -COPY --from=composer:latest /usr/bin/composer /usr/bin/composer -COPY . /usr/src/slim-http-cache -WORKDIR /usr/src/slim-http-cache -CMD [ "php" ] \ No newline at end of file From 1ad70e22bcbe06f7ae47b037aea23eb5a9880ab6 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Tue, 8 Dec 2020 07:34:17 -0300 Subject: [PATCH 03/10] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 616f677..c0b363c 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.2 | ^8.0", + "php": "^7.2 || ^8.0", "psr/http-message": "^1.0", "psr/http-server-middleware": "^1.0" }, From 9b9c6c0b5ac7c9951332aa48ee71855f14b854f3 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Tue, 8 Dec 2020 07:38:20 -0300 Subject: [PATCH 04/10] :tada: php8.0 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c9e508b..8ad112c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ matrix: - php: 7.2 - php: 7.3 - php: 7.4 + - php: 8.0 env: ANALYSIS='true' - php: nightly allow_failures: From 5bcc7e937a19a5b92c5998025ff9fa62333b2d90 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Tue, 8 Dec 2020 07:40:30 -0300 Subject: [PATCH 05/10] :tada: php8.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8ad112c..8608eaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ matrix: - php: 7.2 - php: 7.3 - php: 7.4 - - php: 8.0 env: ANALYSIS='true' + - php: 8.0 - php: nightly allow_failures: - php: nightly From cc6d4ad4a61ae83416665d40127dc482ee5493b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 10:28:37 -0700 Subject: [PATCH 06/10] remove php 8 --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8608eaf..5567a82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: php - dist: trusty matrix: @@ -8,8 +7,8 @@ matrix: - php: 7.3 - php: 7.4 env: ANALYSIS='true' - - php: 8.0 - php: nightly + allow_failures: - php: nightly From c6145f90c479397b0d6dbec256b99d64d831c28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 10:28:58 -0700 Subject: [PATCH 07/10] add phpunit dep --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c0b363c..dffe690 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ "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" }, From 650306c036165d0b318ee6d1c9cdeca4c0547a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 10:29:10 -0700 Subject: [PATCH 08/10] migrate phpunit config --- phpunit.xml.dist | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1f1adc7..515752f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ ./tests/ - - + + ./src/ - - - - - + + + + + + From e7a8f6a4986931344004a59554aa17b70751081a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=83=C2=A9rub=C3=83=C2=A9?= Date: Tue, 8 Dec 2020 10:29:28 -0700 Subject: [PATCH 09/10] update license headers --- src/Cache.php | 2 +- src/CacheProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cache.php b/src/Cache.php index 4f0c147..769d8ee 100644 --- a/src/Cache.php +++ b/src/Cache.php @@ -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); diff --git a/src/CacheProvider.php b/src/CacheProvider.php index 17d46af..e2381cb 100644 --- a/src/CacheProvider.php +++ b/src/CacheProvider.php @@ -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); From 495148c1484979a2969a9be9079d5bd931a75fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=83=C2=A9rub=C3=83=C2=A9?= Date: Tue, 8 Dec 2020 10:29:28 -0700 Subject: [PATCH 10/10] use base TestCase --- tests/CacheProviderTest.php | 3 +-- tests/CacheTest.php | 3 +-- tests/TestCase.php | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 tests/TestCase.php diff --git a/tests/CacheProviderTest.php b/tests/CacheProviderTest.php index 8c3907f..bc7847c 100644 --- a/tests/CacheProviderTest.php +++ b/tests/CacheProviderTest.php @@ -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); @@ -10,7 +10,6 @@ namespace Slim\HttpCache\Tests; use InvalidArgumentException; -use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseInterface; use Slim\HttpCache\CacheProvider; use Slim\Psr7\Factory\ResponseFactory; diff --git a/tests/CacheTest.php b/tests/CacheTest.php index e8b4d57..64fab81 100644 --- a/tests/CacheTest.php +++ b/tests/CacheTest.php @@ -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; diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..f0b2b67 --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,16 @@ +