From 851fa8ba678a530730db901a5970bdcc3205e09a Mon Sep 17 00:00:00 2001 From: SerafimArts Date: Thu, 1 Aug 2024 17:10:23 +0000 Subject: [PATCH] Fix phpunit deprecations --- composer.json | 8 +++---- tests/CompatibilityTest.php | 45 ------------------------------------- 2 files changed, 4 insertions(+), 49 deletions(-) diff --git a/composer.json b/composer.json index 9037b2d..399e361 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^7.4|^8.0" + "php": "^8.1" }, "autoload": { "psr-4": { @@ -24,7 +24,7 @@ } }, "require-dev": { - "phpunit/phpunit": "^9.6|^10.0", + "phpunit/phpunit": "^10.5|^11.0", "phpstan/extension-installer": "^1.4", "phpstan/phpstan": "^1.11", "phpstan/phpstan-strict-rules": "^1.6" @@ -36,8 +36,8 @@ }, "extra": { "branch-alias": { - "dev-master": "3.x-dev", - "dev-main": "3.x-dev" + "dev-master": "4.x-dev", + "dev-main": "4.x-dev" } }, "config": { diff --git a/tests/CompatibilityTest.php b/tests/CompatibilityTest.php index a0ec254..1e8e09a 100644 --- a/tests/CompatibilityTest.php +++ b/tests/CompatibilityTest.php @@ -19,22 +19,6 @@ public function testFileCompatibility(): void { self::expectNotToPerformAssertions(); - new class () implements FileInterface { - public function getPathname(): string {} - - public function getStream() {} - public function getContents(): string {} - public function getHash(): string {} - }; - } - - /** - * @requires PHP 8.0 - */ - public function testFileWithMixedCompatibility(): void - { - self::expectNotToPerformAssertions(); - new class () implements FileInterface { public function getPathname(): string {} @@ -48,20 +32,6 @@ public function testReadableCompatibility(): void { self::expectNotToPerformAssertions(); - new class () implements ReadableInterface { - public function getStream() {} - public function getContents(): string {} - public function getHash(): string {} - }; - } - - /** - * @requires PHP 8.0 - */ - public function testReadableWithMixedCompatibility(): void - { - self::expectNotToPerformAssertions(); - new class () implements ReadableInterface { public function getStream(): mixed {} public function getContents(): string {} @@ -80,21 +50,6 @@ public function testSourceFactoryCompatibility(): void { self::expectNotToPerformAssertions(); - new class () implements SourceFactoryInterface { - public function create($source): ReadableInterface {} - public function createFromString(string $content = '', ?string $name = null): ReadableInterface {} - public function createFromFile(string $filename): FileInterface {} - public function createFromStream($stream, ?string $name = null): ReadableInterface {} - }; - } - - /** - * @requires PHP 8.0 - */ - public function testSourceFactoryWithMixedCompatibility(): void - { - self::expectNotToPerformAssertions(); - new class () implements SourceFactoryInterface { public function create(mixed $source): ReadableInterface {} public function createFromString(string $content = '', ?string $name = null): ReadableInterface {}