Skip to content

Commit

Permalink
Fix phpunit deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Aug 1, 2024
1 parent ab6d83b commit 851fa8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 49 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
}
],
"require": {
"php": "^7.4|^8.0"
"php": "^8.1"
},
"autoload": {
"psr-4": {
"Phplrt\\Contracts\\Source\\": "src"
}
},
"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"
Expand All @@ -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": {
Expand Down
45 changes: 0 additions & 45 deletions tests/CompatibilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

Expand All @@ -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 {}
Expand All @@ -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 {}
Expand Down

0 comments on commit 851fa8b

Please sign in to comment.