klaviyo / klaviyo-api-php

PHP SDK for Klaviyo API
https://developers.klaviyo.com
MIT License
46 stars 21 forks source link

Use PSR-18 "http-client" interface instead of Guzzle #28

Open kktsvetkov opened 1 year ago

kktsvetkov commented 1 year ago

This project is using Guzzle as its HTTP client. Nowadays most projects (including frameworks) already have a PSR-18 compatible HTTP client library. It's been like that for some time and there are options to choose from if you want to use something different.

It will be a lot better if the selection of the HTTP client to use is left to the developer. You will remove the hard dependency to Guzzle, and make it easier to add test coverage for this project.

You can still recommend Guzzle and its adapters in composer.json as your preferred suggestion. You can also add some very quick detection of known "http-client" projects to make it easier to use with less configuration.