Skip to content

Commit ccfa7af

Browse files
authored
Remove deprecated codes (#5812)
1 parent 222821c commit ccfa7af

File tree

4 files changed

+4
-50
lines changed

4 files changed

+4
-50
lines changed

src/Server/Connection/SwooleConnection.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/Server/ConnectionInterface.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/Server/Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ public function getTrailers(): array
8282
return $this->trailers;
8383
}
8484

85-
public function setConnection(ConnectionInterface|Writable $connection)
85+
public function setConnection(Writable $connection)
8686
{
8787
$this->connection = $connection;
8888
return $this;
8989
}
9090

91-
public function getConnection(): ConnectionInterface|Writable|null
91+
public function getConnection(): ?Writable
9292
{
9393
return $this->connection;
9494
}

tests/ResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
*/
1212
namespace HyperfTest\HttpMessage;
1313

14+
use Hyperf\Engine\Http\WritableConnection;
1415
use Hyperf\HttpMessage\Cookie\Cookie;
15-
use Hyperf\HttpMessage\Server\Connection\SwooleConnection;
1616
use Hyperf\HttpMessage\Server\Response;
1717
use Mockery;
1818
use PHPUnit\Framework\Attributes\CoversNothing;
@@ -64,7 +64,7 @@ public function testWrite()
6464
$swooleResponse->shouldReceive('write')->with($content)->once()->andReturn(true);
6565

6666
$response = $this->newResponse();
67-
$response->setConnection(new SwooleConnection($swooleResponse));
67+
$response->setConnection(new WritableConnection($swooleResponse));
6868
$status = $response->write($content);
6969
$this->assertTrue($status);
7070
}

0 commit comments

Comments
 (0)