diff --git a/composer.json b/composer.json index f9a8273..b19bf98 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "psr/http-factory": "^1.0", "psr/http-message": "^1.0", "ralouphie/getallheaders": "^3", - "symfony/polyfill-php80": "^1.20" + "symfony/polyfill-php80": "^1.22" }, "require-dev": { "ext-json": "*", @@ -41,7 +41,7 @@ "http-interop/http-factory-tests": "^0.9.0", "php-http/psr7-integration-tests": "dev-master", "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^8.5 || ^9.3", + "phpunit/phpunit": "^8.5 || ^9.5", "squizlabs/php_codesniffer": "^3.5", "weirdan/prophecy-shim": "^1.0 || ^2.0.2" }, diff --git a/tests/UploadedFileTest.php b/tests/UploadedFileTest.php index 4a4ffaf..c9dce30 100644 --- a/tests/UploadedFileTest.php +++ b/tests/UploadedFileTest.php @@ -12,6 +12,7 @@ use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use PHPUnit\Runner\Version; use Prophecy\PhpUnit\ProphecyTrait; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileInterface; @@ -36,6 +37,7 @@ use function sys_get_temp_dir; use function uniqid; use function unlink; +use function version_compare; use const DIRECTORY_SEPARATOR; use const UPLOAD_ERR_CANT_WRITE; @@ -358,7 +360,11 @@ public function testMoveToStream() $movedFileContents = ob_get_clean(); $this->assertEquals($contents, $movedFileContents); - $this->assertFileNotExists($fileName); + if (version_compare(Version::series(), '9.1', '>=')) { + $this->assertFileDoesNotExist($fileName); + } else { + $this->assertFileNotExists($fileName); + } } /**