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
Sparkpost requires php-http client (see [Setting up a Request Adapter](#setting-up-a-request-adapter)). There are several [providers](https://packagist.org/providers/php-http/client-implementation) available. If you were using guzzle6 your install might look like this.
27
27
28
28
```
29
-
composer require guzzlehttp/guzzle
30
-
composer require php-http/guzzle6-adapter
29
+
composer require php-http/guzzle6-adapter "^1.1"
30
+
composer require guzzlehttp/guzzle "^6.0"
31
31
```
32
32
33
33
Next, run the Composer command to install the SparkPost PHP Library:
@@ -43,7 +43,29 @@ require 'vendor/autoload.php';
43
43
use SparkPost\SparkPost;
44
44
```
45
45
46
-
**Note:** Without composer the costs outweight the benefits of using the PHP client library. A simple function like the one in [issue #164](https://github.com/SparkPost/php-sparkpost/issues/164#issuecomment-289888237) wraps the SparkPost API and makes it easy to use the API without resolving the composer dependencies.
46
+
**Note:** Without composer the costs outweigh the benefits of using the PHP client library. A simple function like the one in [issue #164](https://github.com/SparkPost/php-sparkpost/issues/164#issuecomment-289888237) wraps the SparkPost API and makes it easy to use the API without resolving the composer dependencies.
47
+
48
+
## Running with IDEs
49
+
50
+
When running with `xdebug` under an IDE such as VS Code, you may see an exception is thrown in file `vendor/php-http/discovery/src/Strategy/PuliBetaStrategy.php`:
51
+
52
+
```
53
+
Exception has occurred.
54
+
Http\Discovery\Exception\PuliUnavailableException: Puli Factory is not available
55
+
```
56
+
57
+
[This is usual](http://docs.php-http.org/en/latest/discovery.html#puli-factory-is-not-available). Puli is not required to use the library. You can resume running after the exception.
58
+
59
+
You can prevent the exception, by setting the discovery strategies, prior to creating the adapter object:
60
+
```php
61
+
// Prevent annoying "Puli exception" during work with xdebug / IDE
62
+
// See https://github.com/getsentry/sentry-php/issues/801
0 commit comments