Skip to content

Commit 749a24c

Browse files
committed
🚿
1 parent 76cef04 commit 749a24c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ An API documentation created with [phpDocumentor](https://www.phpdoc.org/) can b
3232

3333

3434
## Requirements
35-
- PHP 8.1+
35+
- PHP 8.4+
3636
- [`ext-curl`](https://www.php.net/manual/book.curl.php)
3737
- from dependencies:
3838
- [`ext-fileinfo`](https://www.php.net/manual/book.fileinfo.php)
@@ -56,12 +56,12 @@ composer require chillerlan/php-httpinterface
5656
```json
5757
{
5858
"require": {
59-
"php": "^8.1",
59+
"php": "^8.4",
6060
"chillerlan/php-httpinterface": "dev-main#<commit_hash>"
6161
}
6262
}
6363
```
64-
Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^6.0` - see [releases](https://github.com/chillerlan/php-httpinterface/releases) for valid versions.
64+
Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^7.0` - see [releases](https://github.com/chillerlan/php-httpinterface/releases) for valid versions.
6565

6666
Profit!
6767

@@ -77,10 +77,12 @@ using a PSR-7 `RequestInterface` and expect a PSR-7 `ResponseInterface`.
7777
### `CurlClient`, `StreamClient`
7878

7979
```php
80-
$options = new HTTPOptions;
81-
$options->ca_info = '/path/to/cacert.pem';
82-
$options->user_agent = 'my cool user agent 1.0';
83-
$options->dns_over_https = 'https://cloudflare-dns.com/dns-query';
80+
$options = new HTTPOptions;
81+
$options->user_agent = 'my cool user agent 1.0';
82+
$options->ca_info = '/path/to/cacert.pem';
83+
$options->dns_over_https = 'https://cloudflare-dns.com/dns-query';
84+
$options->curl_check_OCSP = true;
85+
$options->curl_check_doh_OCSP = true;
8486

8587
$httpClient = new CurlClient($responseFactory, $options, $logger);
8688
$request = $requestFactory->createRequest('GET', 'https://www.example.com?foo=bar');

‎src/HTTPOptionsTrait.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ trait HTTPOptionsTrait{
4444
*/
4545
public array $curl_options = [] {
4646
set{
47-
4847
// let's check if there's a CA bundle given via the cURL options and move it to the ca_info option instead
4948
foreach([CURLOPT_CAINFO, CURLOPT_CAINFO_BLOB, CURLOPT_CAPATH] as $opt){
5049

@@ -59,7 +58,6 @@ trait HTTPOptionsTrait{
5958
}
6059

6160
$this->curl_options = $value;
62-
6361
}
6462
}
6563

0 commit comments

Comments
 (0)