Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14023244
D10008.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Referenced Files
None
Subscribers
None
D10008.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -56,11 +56,11 @@
'FutureIteratorTestCase' => 'future/__tests__/FutureIteratorTestCase.php',
'FutureProxy' => 'future/FutureProxy.php',
'HTTPFuture' => 'future/http/HTTPFuture.php',
+ 'HTTPFutureCURLesponseStatus' => 'future/http/status/HTTPFutureCURLResponseStatus.php',
+ 'HTTPFutureHTTPResponseStatus' => 'future/http/status/HTTPFutureHTTPResponseStatus.php',
+ 'HTTPFutureParseResponseStatus' => 'future/http/status/HTTPFutureParseResponseStatus.php',
'HTTPFutureResponseStatus' => 'future/http/status/HTTPFutureResponseStatus.php',
- 'HTTPFutureResponseStatusCURL' => 'future/http/status/HTTPFutureResponseStatusCURL.php',
- 'HTTPFutureResponseStatusHTTP' => 'future/http/status/HTTPFutureResponseStatusHTTP.php',
- 'HTTPFutureResponseStatusParse' => 'future/http/status/HTTPFutureResponseStatusParse.php',
- 'HTTPFutureResponseStatusTransport' => 'future/http/status/HTTPFutureResponseStatusTransport.php',
+ 'HTTPFutureTransportResponseStatus' => 'future/http/status/HTTPFutureTransportResponseStatus.php',
'HTTPSFuture' => 'future/http/HTTPSFuture.php',
'ImmediateFuture' => 'future/ImmediateFuture.php',
'LinesOfALarge' => 'filesystem/linesofalarge/LinesOfALarge.php',
@@ -503,11 +503,11 @@
'FutureIteratorTestCase' => 'PhutilTestCase',
'FutureProxy' => 'Future',
'HTTPFuture' => 'BaseHTTPFuture',
+ 'HTTPFutureCURLesponseStatus' => 'HTTPFutureResponseStatus',
+ 'HTTPFutureHTTPResponseStatus' => 'HTTPFutureResponseStatus',
+ 'HTTPFutureParseResponseStatus' => 'HTTPFutureResponseStatus',
'HTTPFutureResponseStatus' => 'Exception',
- 'HTTPFutureResponseStatusCURL' => 'HTTPFutureResponseStatus',
- 'HTTPFutureResponseStatusHTTP' => 'HTTPFutureResponseStatus',
- 'HTTPFutureResponseStatusParse' => 'HTTPFutureResponseStatus',
- 'HTTPFutureResponseStatusTransport' => 'HTTPFutureResponseStatus',
+ 'HTTPFutureTransportResponseStatus' => 'HTTPFutureResponseStatus',
'HTTPSFuture' => 'BaseHTTPFuture',
'ImmediateFuture' => 'Future',
'LinesOfALarge' => 'Iterator',
diff --git a/src/auth/PhutilGoogleAuthAdapter.php b/src/auth/PhutilGoogleAuthAdapter.php
--- a/src/auth/PhutilGoogleAuthAdapter.php
+++ b/src/auth/PhutilGoogleAuthAdapter.php
@@ -116,7 +116,7 @@
}
private function tryToThrowSpecializedError($status, $raw_body) {
- if (!($status instanceof HTTPFutureResponseStatusHTTP)) {
+ if (!($status instanceof HTTPFutureHTTPResponseStatus)) {
return;
}
diff --git a/src/future/aws/PhutilAWSFuture.php b/src/future/aws/PhutilAWSFuture.php
--- a/src/future/aws/PhutilAWSFuture.php
+++ b/src/future/aws/PhutilAWSFuture.php
@@ -86,7 +86,7 @@
}
if ($status->isError() || !$xml) {
- if (!($status instanceof HTTPFutureResponseStatusHTTP)) {
+ if (!($status instanceof HTTPFutureHTTPResponseStatus)) {
throw $status;
}
diff --git a/src/future/http/BaseHTTPFuture.php b/src/future/http/BaseHTTPFuture.php
--- a/src/future/http/BaseHTTPFuture.php
+++ b/src/future/http/BaseHTTPFuture.php
@@ -334,7 +334,7 @@
}
}
- $status = new HTTPFutureResponseStatusHTTP(
+ $status = new HTTPFutureHTTPResponseStatus(
$response_code,
$body,
$headers,
@@ -404,8 +404,8 @@
$body = null;
$headers = array();
- $status = new HTTPFutureResponseStatusParse(
- HTTPFutureResponseStatusParse::ERROR_MALFORMED_RESPONSE,
+ $status = new HTTPFutureParseResponseStatus(
+ HTTPFutureParseResponseStatus::ERROR_MALFORMED_RESPONSE,
$raw_response);
return array($status, $body, $headers);
}
diff --git a/src/future/http/HTTPFuture.php b/src/future/http/HTTPFuture.php
--- a/src/future/http/HTTPFuture.php
+++ b/src/future/http/HTTPFuture.php
@@ -20,7 +20,7 @@
* $headers) = $future->resolve();
*
* Prefer @{method:resolvex} to @{method:resolve} as the former throws
- * @{class:HTTPFutureResponseStatusHTTP} on failures, which includes an
+ * @{class:HTTPFutureHTTPResponseStatus} on failures, which includes an
* informative exception message.
*/
final class HTTPFuture extends BaseHTTPFuture {
@@ -178,7 +178,7 @@
if (!$socket) {
$this->stateReady = true;
$this->result = $this->buildErrorResult(
- HTTPFutureResponseStatusTransport::ERROR_CONNECTION_FAILED);
+ HTTPFutureTransportResponseStatus::ERROR_CONNECTION_FAILED);
return null;
}
@@ -207,13 +207,13 @@
if ($timeout) {
$this->result = $this->buildErrorResult(
- HTTPFutureResponseStatusTransport::ERROR_TIMEOUT);
+ HTTPFutureTransportResponseStatus::ERROR_TIMEOUT);
} else if (!$this->stateConnected) {
$this->result = $this->buildErrorResult(
- HTTPFutureResponseStatusTransport::ERROR_CONNECTION_REFUSED);
+ HTTPFutureTransportResponseStatus::ERROR_CONNECTION_REFUSED);
} else if (!$this->stateWriteComplete) {
$this->result = $this->buildErrorResult(
- HTTPFutureResponseStatusTransport::ERROR_CONNECTION_FAILED);
+ HTTPFutureTransportResponseStatus::ERROR_CONNECTION_FAILED);
} else {
$this->result = $this->parseRawHTTPResponse($this->response);
}
@@ -226,7 +226,7 @@
private function buildErrorResult($error) {
return array(
- $status = new HTTPFutureResponseStatusTransport($error, $this->getURI()),
+ $status = new HTTPFutureTransportResponseStatus($error, $this->getURI()),
$body = null,
$headers = array());
}
diff --git a/src/future/http/HTTPSFuture.php b/src/future/http/HTTPSFuture.php
--- a/src/future/http/HTTPSFuture.php
+++ b/src/future/http/HTTPSFuture.php
@@ -360,7 +360,7 @@
$err_code = $info['result'];
if ($err_code) {
- $status = new HTTPFutureResponseStatusCURL($err_code, $uri);
+ $status = new HTTPFutureCURLesponseStatus($err_code, $uri);
$body = null;
$headers = array();
$this->result = array($status, $body, $headers);
diff --git a/src/future/http/status/HTTPFutureResponseStatusCURL.php b/src/future/http/status/HTTPFutureCURLResponseStatus.php
rename from src/future/http/status/HTTPFutureResponseStatusCURL.php
rename to src/future/http/status/HTTPFutureCURLResponseStatus.php
--- a/src/future/http/status/HTTPFutureResponseStatusCURL.php
+++ b/src/future/http/status/HTTPFutureCURLResponseStatus.php
@@ -1,6 +1,6 @@
<?php
-final class HTTPFutureResponseStatusCURL extends HTTPFutureResponseStatus {
+final class HTTPFutureCURLesponseStatus extends HTTPFutureResponseStatus {
protected function getErrorCodeType($code) {
return 'cURL';
@@ -66,7 +66,6 @@
'indicates that the remote host has an SSL certificate for a '.
'different domain name than you are connecting with. Make sure the '.
'certificate you have installed is signed for the correct domain.',
-
);
$default_message =
diff --git a/src/future/http/status/HTTPFutureResponseStatusHTTP.php b/src/future/http/status/HTTPFutureHTTPResponseStatus.php
rename from src/future/http/status/HTTPFutureResponseStatusHTTP.php
rename to src/future/http/status/HTTPFutureHTTPResponseStatus.php
--- a/src/future/http/status/HTTPFutureResponseStatusHTTP.php
+++ b/src/future/http/status/HTTPFutureHTTPResponseStatus.php
@@ -1,6 +1,6 @@
<?php
-final class HTTPFutureResponseStatusHTTP extends HTTPFutureResponseStatus {
+final class HTTPFutureHTTPResponseStatus extends HTTPFutureResponseStatus {
private $excerpt;
private $expect;
@@ -10,6 +10,7 @@
$body,
array $headers,
$expect = null) {
+
// NOTE: Avoiding phutil_utf8_shorten() here because this isn't lazy
// and responses may be large.
if (strlen($body) > 512) {
diff --git a/src/future/http/status/HTTPFutureResponseStatusParse.php b/src/future/http/status/HTTPFutureParseResponseStatus.php
rename from src/future/http/status/HTTPFutureResponseStatusParse.php
rename to src/future/http/status/HTTPFutureParseResponseStatus.php
--- a/src/future/http/status/HTTPFutureResponseStatusParse.php
+++ b/src/future/http/status/HTTPFutureParseResponseStatus.php
@@ -1,6 +1,6 @@
<?php
-final class HTTPFutureResponseStatusParse extends HTTPFutureResponseStatus {
+final class HTTPFutureParseResponseStatus extends HTTPFutureResponseStatus {
const ERROR_MALFORMED_RESPONSE = 1;
diff --git a/src/future/http/status/HTTPFutureResponseStatus.php b/src/future/http/status/HTTPFutureResponseStatus.php
--- a/src/future/http/status/HTTPFutureResponseStatus.php
+++ b/src/future/http/status/HTTPFutureResponseStatus.php
@@ -22,7 +22,6 @@
parent::__construct($message);
}
-
final public function getStatusCode() {
return $this->statusCode;
}
diff --git a/src/future/http/status/HTTPFutureResponseStatusTransport.php b/src/future/http/status/HTTPFutureTransportResponseStatus.php
rename from src/future/http/status/HTTPFutureResponseStatusTransport.php
rename to src/future/http/status/HTTPFutureTransportResponseStatus.php
--- a/src/future/http/status/HTTPFutureResponseStatusTransport.php
+++ b/src/future/http/status/HTTPFutureTransportResponseStatus.php
@@ -1,6 +1,6 @@
<?php
-final class HTTPFutureResponseStatusTransport extends HTTPFutureResponseStatus {
+final class HTTPFutureTransportResponseStatus extends HTTPFutureResponseStatus {
const ERROR_TIMEOUT = 1;
const ERROR_CONNECTION_ABORTED = 2;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 12:12 AM (1 d, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6716657
Default Alt Text
D10008.diff (9 KB)
Attached To
Mode
D10008: Rename `HTTPFutureResponseStatus` subclasses
Attached
Detach File
Event Timeline
Log In to Comment