From 50ae7b673e0bc05cf94ba8d1bd6c9fa440db239c Mon Sep 17 00:00:00 2001 From: Adrian Suter Date: Wed, 1 Jul 2020 13:46:17 +0200 Subject: [PATCH] Initialize support for php 8 --- .gitignore | 1 + .travis.yml | 4 ++++ composer.json | 4 ++-- phpunit.xml.dist | 2 +- tests/AbstractIntegrationTest.php | 4 ++-- tests/FileStreamWrapperTest.php | 2 +- tests/IntegrationCustomNamespaceTest.php | 2 +- tests/IntegrationNamespaceTest.php | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index da52ddb..f1c2f91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .idea +.phpunit.result.cache composer.lock coverage docs/_site diff --git a/.travis.yml b/.travis.yml index 49b6f55..21e0969 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,10 @@ matrix: - php: 7.3 - php: 7.4 env: ANALYSIS='true' + - php: nightly + + allow_failures: + - php: nightly before_script: - if [[ "$ANALYSIS" == 'true' ]]; then composer require php-coveralls/php-coveralls:^2.2.0 ; fi diff --git a/composer.json b/composer.json index 34d361e..0440171 100644 --- a/composer.json +++ b/composer.json @@ -34,12 +34,12 @@ ] }, "require": { - "php": "^7.1", + "php": "^7.2 || ^8.0", "nikic/php-parser": "^4.4" }, "require-dev": { "phpstan/phpstan": "^0.12.25", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.5", "squizlabs/php_codesniffer": "^3.5" }, "scripts": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9a450c6..5f44a59 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ overrideApplied) { diff --git a/tests/FileStreamWrapperTest.php b/tests/FileStreamWrapperTest.php index 3080f74..80e9ee0 100644 --- a/tests/FileStreamWrapperTest.php +++ b/tests/FileStreamWrapperTest.php @@ -22,7 +22,7 @@ final class FileStreamWrapperTest extends TestCase */ private $tempFilePath; - protected function tearDown() + protected function tearDown(): void { // Make sure that we restore the default file stream wrapper. \stream_wrapper_restore('file'); diff --git a/tests/IntegrationCustomNamespaceTest.php b/tests/IntegrationCustomNamespaceTest.php index 828ca13..1ee4400 100644 --- a/tests/IntegrationCustomNamespaceTest.php +++ b/tests/IntegrationCustomNamespaceTest.php @@ -12,7 +12,7 @@ class IntegrationCustomNamespaceTest extends AbstractIntegrationTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { require_once(__DIR__ . '/assets/PHPCustomAutoloadOverride.php'); } diff --git a/tests/IntegrationNamespaceTest.php b/tests/IntegrationNamespaceTest.php index f0ef0f0..f947496 100644 --- a/tests/IntegrationNamespaceTest.php +++ b/tests/IntegrationNamespaceTest.php @@ -12,7 +12,7 @@ class IntegrationNamespaceTest extends AbstractIntegrationTest { - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { require_once(__DIR__ . '/assets/PHPAutoloadOverride.php'); }