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: CHANGELOG.md
+5
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
## [5.0.0] - 2022-11-25
2
+
### Removed
3
+
4
+
* Removed guzzle5-adapter and guzzle6-adapter documentation and support; this version now supports any PSR-7 compatible client library. Our documentation provides examples for using guzzle7.
Copy file name to clipboardExpand all lines: DOCUMENTATION.md
+4-31
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@ This documentation is for developers interested in using the GOV.UK Notify PHP c
4
4
5
5
## Set up the client
6
6
7
-
The Notify PHP Client is based on a [PSR-7 HTTP model](https://www.php-fig.org/psr/psr-7/)[external link]. To install it, you must select your preferred PSR-7 compatible HTTP client. You can follow these instructions to use [Guzzle v6 and v5](http://docs.guzzlephp.org/en/stable/)[external link].
7
+
The Notify PHP Client is based on a [PSR-7 HTTP model](https://www.php-fig.org/psr/psr-7/)[external link]. To install it, you must select your preferred PSR-7 compatible HTTP client. You can follow these instructions to use [Guzzle v7](https://docs.guzzlephp.org/en/7.0/)[external link].
8
8
9
-
### Guzzle v6
9
+
### Guzzle v7
10
10
11
11
1. Use [Composer](https://getcomposer.org/)[external link] to install the GOV.UK Notify PHP client. Run the following in the command line:
You can now use the [autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading) [external link] to download the GOV.UK Notify PHP client.
@@ -21,39 +21,12 @@ The Notify PHP Client is based on a [PSR-7 HTTP model](https://www.php-fig.org/p
21
21
```
22
22
$notifyClient = new \Alphagov\Notifications\Client([
23
23
'apiKey'=>'{your api key}',
24
-
'httpClient'=> new \Http\Adapter\Guzzle6\Client
24
+
'httpClient'=> new \Http\Adapter\Guzzle7\Client
25
25
]);
26
26
```
27
27
28
28
To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in) and go to the __API integration__ page. You can find more information in the [API keys](#api-keys) section of this documentation.
29
29
30
-
### Guzzle v5
31
-
32
-
1. Use [Composer](https://getcomposer.org/) [external link] to install the GOV.UK Notify PHP client. Run the following in the command line:
You can now use the [autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading) [external link] to download the GOV.UK Notify PHP client.
39
-
40
-
1. Add the following code to your application to create a new instance of the client:
41
-
42
-
```
43
-
$notifyClient = new \Alphagov\Notifications\Client([
44
-
'apiKey'=>'{your api key}',
45
-
'httpClient'=> new \Http\Adapter\Guzzle5\Client(
46
-
new \GuzzleHttp\Client,
47
-
new \Http\Message\MessageFactory\GuzzleMessageFactory
48
-
),
49
-
]);
50
-
```
51
-
52
-
1. Run `$notifyClient` to access the GOV.UK Notify API.
53
-
54
-
To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in) and go to the __API integration__ page. You can find more information in the [API keys](#api-keys) section of this documentation.
55
-
56
-
57
30
## Send a message
58
31
59
32
You can use GOV.UK Notify to send text messages, emails and letters.
0 commit comments