This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 58d68c6bd Revert "THRIFT-1482 Allow unix domain sockets in TSocket"
58d68c6bd is described below
commit 58d68c6bdb8dcbf655e79d9a26c521400f038e3e
Author: Jens Geyer <[email protected]>
AuthorDate: Fri Apr 18 11:28:00 2025 +0200
Revert "THRIFT-1482 Allow unix domain sockets in TSocket"
This reverts commit 0481fcdf93a5bac9a28355429672885fd105c10e.
---
lib/php/lib/Transport/TSocket.php | 2 +-
lib/php/test/Unit/Lib/Transport/TSocketTest.php | 27 -------------------------
2 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/lib/php/lib/Transport/TSocket.php
b/lib/php/lib/Transport/TSocket.php
index c220a8b06..fb74fdbf6 100644
--- a/lib/php/lib/Transport/TSocket.php
+++ b/lib/php/lib/Transport/TSocket.php
@@ -218,7 +218,7 @@ class TSocket extends TTransport
throw new TTransportException('Cannot open null host',
TTransportException::NOT_OPEN);
}
- if ($this->port_ <= 0 && strpos($this->host_, 'unix://') !== 0) {
+ if ($this->port_ <= 0) {
throw new TTransportException('Cannot open without port',
TTransportException::NOT_OPEN);
}
diff --git a/lib/php/test/Unit/Lib/Transport/TSocketTest.php
b/lib/php/test/Unit/Lib/Transport/TSocketTest.php
index 3a6a5ebfa..6bab297ea 100644
--- a/lib/php/test/Unit/Lib/Transport/TSocketTest.php
+++ b/lib/php/test/Unit/Lib/Transport/TSocketTest.php
@@ -246,33 +246,6 @@ class TSocketTest extends TestCase
$this->assertTrue($transport->isOpen());
}
- public function testOpenUnixSocket()
- {
- $host = 'unix:///tmp/ipc.sock';
- $port = -1;
- $persist = false;
- $debugHandler = null;
-
- $this->getFunctionMock('Thrift\Transport', 'fsockopen')
- ->expects($this->once())
- ->with(
- $host,
- $port,
- $this->anything(), #$errno,
- $this->anything(), #$errstr,
- $this->anything() #$this->sendTimeoutSec_ +
($this->sendTimeoutUsec_ / 1000000),
- );
-
- $transport = new TSocket(
- $host,
- $port,
- $persist,
- $debugHandler
- );
-
- $transport->open();
- }
-
/**
* @dataProvider open_THRIFT_5132_DataProvider
*/