You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,16 @@
9
9
A PHP client for the Heroku Platform API, similar to [platform-api](https://github.com/heroku/platform-api) for Ruby and [node-heroku-client](https://github.com/heroku/node-heroku-client) for Node.js. With it you can create and alter Heroku apps, install or remove add-ons, scale resources up and down, and use any other capabilities documented by the [Platform API Reference](https://devcenter.heroku.com/articles/platform-api-reference).
10
10
11
11
## Features
12
-
- Reads `HEROKU_API_KEY` for zero-config use
12
+
- Reads `HEROKU_API_KEY` for zero-config use (deprecated)
13
13
- Returns JSON-decoded Heroku API responses
14
14
- Exposes response headers (necessary for some API functionality)
15
15
- Uses a built-in cURL-based HTTP client or one that you provide
16
16
- Accepts cURL options and custom request headers
17
17
- Throws informative exceptions for authentication, JSON, and HTTP errors
18
-
- Designed around [PSR-7](http://www.php-fig.org/psr/psr-7/) (Request/Response) and [HTTPlug](http://docs.php-http.org/en/latest/httplug/introduction.html) (HttpClient) interfaces
18
+
- Designed around the [PSR-7](http://www.php-fig.org/psr/psr-7/) (Request/Response) and [PSR-18](https://www.php-fig.org/psr/psr-18/) (HTTP client) standards
19
19
20
20
## Requirements
21
-
- PHP 5.6 / 7
21
+
- PHP 7.1+ (For PHP 5.6 or 7.0 use our 1.x branch)
22
22
- cURL, unless providing an HTTP client without cURL dependencies (such as [Socket Client](http://docs.php-http.org/en/latest/clients/socket-client.html))
The client can be configured at instantiation with these settings, all of which are optional and have sane defaults:
60
60
```php
61
61
new HerokuClient([
62
-
'apiKey' => 'my-api-key', // If not set, the client finds HEROKU_API_KEY or fails
62
+
'apiKey' => 'my-api-key', // If not set, the client finds HEROKU_API_KEY (deprecated) or fails
63
63
'baseUrl' => 'http://custom.base.url/', // Defaults to https://api.heroku.com/
64
-
'httpClient' => $myFavoriteHttpClient, // Any client implementing HTTPlug's HttpClient interface
64
+
'httpClient' => $myFavoriteHttpClient, // Any PSR-18 compatible HTTP client
65
65
'curlOptions' => [ // Options can be set when using the default HTTP client
66
66
CURLOPT_TIMEOUT => 10,
67
67
CURLOPT_USERAGENT => 'My Agent',
@@ -114,7 +114,7 @@ try {
114
114
-`JsonEncodingException`
115
115
-`MissingApiKeyException`
116
116
117
-
In addition to exceptions thrown directly from this API client, [standardized exceptions](http://docs.php-http.org/en/latest/httplug/exceptions.html) may bubble up from the HTTPlug client implementation in use.
117
+
In addition to exceptions thrown directly from this API client, [standardized exceptions](https://www.php-fig.org/psr/psr-18/#clientexceptioninterface) may bubble up from the HTTP client.
118
118
119
119
## Contributing
120
120
Pull Requests are welcome. Please see our [Contribution Guidelines](CONTRIBUTING.md).
0 commit comments