Skip to content

Commit 716c2f3

Browse files
committed
Improve documentation and code
Improve RequestException Remove unnecessary TransferException stub Improve Exception Remove unused import Improve Change Log Improve composer.json Add the team to the license file Replace gitter with slack Fix badge URL
1 parent 5e03ea5 commit 716c2f3

File tree

10 files changed

+25
-20
lines changed

10 files changed

+25
-20
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# Change Log
22

33

4+
## 1.0.0 - Unreleased
5+
6+
### Added
7+
8+
- Better domain exceptions.
9+
10+
### Changed
11+
12+
- Purpose of the library: general HTTP CLient abstraction.
13+
14+
### Removed
15+
16+
- Request options: they should be configured at construction time.
17+
- Multiple request sending: should be done asynchronously using Async Client.
18+
- `getName` method
19+
20+
421
## 0.1.0 - 2015-06-03
522

623
### Added

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Copyright (c) 2014-2015 Eric GELOEN <[email protected]>
2+
Copyright (c) 2015 PHP HTTP Team <[email protected]>
23

34
Permission is hereby granted, free of charge, to any person obtaining a copy
45
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug)
88
[![Total Downloads](https://img.shields.io/packagist/dt/php-http/httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/httplug)
99

10-
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/php-http/httplug?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
10+
[![Slack Status](http://slack.httplug.io/badge.svg)](http://slack.httplug.io)
1111

1212
**HTTPlug, the HTTP client abstraction for PHP.**
1313

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "HTTPlug, the HTTP client abstraction for PHP",
44
"license": "MIT",
55
"keywords": ["http", "client"],
6-
"homepage": "http://php-http.org",
6+
"homepage": "http://httplug.io",
77
"authors": [
88
{
99
"name": "Eric GELOEN",

spec/Exception/HttpExceptionSpec.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ class HttpExceptionSpec extends ObjectBehavior
1010
{
1111
function let(RequestInterface $request, ResponseInterface $response)
1212
{
13-
$response->getStatusCode()->willReturn(400);
14-
1513
$this->beConstructedWith('message', $request, $response);
1614
}
1715

spec/Exception/TransferExceptionSpec.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22

33
namespace spec\Http\Client\Exception;
44

5-
use Http\Client\Exception\TransferException;
65
use PhpSpec\ObjectBehavior;
76

87
class TransferExceptionSpec extends ObjectBehavior
98
{
10-
function let()
11-
{
12-
$this->beAnInstanceOf('spec\Http\Client\Exception\TransferExceptionStub');
13-
}
14-
159
function it_is_a_runtime_exception()
1610
{
1711
$this->shouldHaveType('RuntimeException');
@@ -22,7 +16,3 @@ function it_is_an_exception()
2216
$this->shouldImplement('Http\Client\Exception');
2317
}
2418
}
25-
26-
class TransferExceptionStub extends TransferException
27-
{
28-
}

src/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Http\Client;
44

55
/**
6-
* Every HTTP Client related Exception must implement this interface
6+
* Every HTTP Client related Exception must implement this interface.
77
*
88
* @author Márk Sági-Kazár <[email protected]>
99
*/

src/Exception/HttpException.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Psr\Http\Message\ResponseInterface;
77

88
/**
9-
* Thrown when a response was received but has an error status code.
9+
* Thrown when a response was received but the request itself failed.
1010
*
1111
* In addition to the request, this exception always provides access to the response object.
1212
*
@@ -38,7 +38,7 @@ public function __construct(
3838
}
3939

4040
/**
41-
* Returns the response
41+
* Returns the response.
4242
*
4343
* @return ResponseInterface
4444
*/
@@ -48,7 +48,7 @@ public function getResponse()
4848
}
4949

5050
/**
51-
* Factory method to create a new exception with a normalized error message
51+
* Factory method to create a new exception with a normalized error message.
5252
*
5353
* @param RequestInterface $request
5454
* @param ResponseInterface $response

src/Exception/RequestException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct($message, RequestInterface $request, \Exception $pre
3232
}
3333

3434
/**
35-
* Returns the request
35+
* Returns the request.
3636
*
3737
* @return RequestInterface
3838
*/

src/HttpClient.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Http\Client;
44

5-
use Http\Client\Exception\BatchException;
65
use Psr\Http\Message\RequestInterface;
76
use Psr\Http\Message\ResponseInterface;
87

0 commit comments

Comments
 (0)