From 2c04d1fc3db0fe82798cbc5b6bfbbb3f99ce58ed Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Sat, 5 Dec 2020 18:00:16 -0300 Subject: [PATCH 1/9] :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..1bc5b12 --- /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-twig-view +WORKDIR /usr/src/slim-twig-view +CMD [ "php" ] \ No newline at end of file diff --git a/composer.json b/composer.json index 77f82a1..8652064 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", "slim/slim": "^4.7", "twig/twig": "^3.1" From 508c9bcaeb715bbb77f224db024941f77cedc75d Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Sat, 5 Dec 2020 20:19:40 -0300 Subject: [PATCH 2/9] :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 1bc5b12..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-twig-view -WORKDIR /usr/src/slim-twig-view -CMD [ "php" ] \ No newline at end of file From 84487623bc852ecc44feedb50b8a5a6f9f5e9785 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Tue, 8 Dec 2020 07:33:27 -0300 Subject: [PATCH 3/9] Update composer.json Co-authored-by: Sean Hamlin --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8652064..d30da11 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", "slim/slim": "^4.7", "twig/twig": "^3.1" From b52e52869aaa5f41504a02a9dfab30af2216f628 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Tue, 8 Dec 2020 07:36:37 -0300 Subject: [PATCH 4/9] :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 800b2031a6d077b2626c343fc80199cfeb2eec49 Mon Sep 17 00:00:00 2001 From: Jerfeson Guerreiro Date: Tue, 8 Dec 2020 07:41:03 -0300 Subject: [PATCH 5/9] :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 6cb0d90bb47f9e5c02f7151a1132c81d3b849376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 09:55:17 -0700 Subject: [PATCH 6/9] remove php 8 from travis config --- .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 16d5ec2ed9515158bcf8724f1e1d507a22ac0bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 09:55:36 -0700 Subject: [PATCH 7/9] update phpunit and add prophecy shim --- composer.json | 5 +++-- tests/TestCase.php | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d30da11..92a8bb6 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,11 @@ "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": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 4bb1df2..9407dd7 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -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); From bf491aa9421ae1cb4d3eb990bca52fa3140b91d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 09:55:44 -0700 Subject: [PATCH 8/9] update phpunit config --- phpunit.xml.dist | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f54f0a8..59d70c3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ - ./tests/ + ./tests/ - - + + + ./src/ - - - - - + + + + + From 4d2687035ffa8ae780d9d7794cab4221f02c0f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Tue, 8 Dec 2020 09:57:08 -0700 Subject: [PATCH 9/9] whitespacing --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 59d70c3..33f8298 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,7 +16,7 @@ > - ./tests/ + ./tests/