Open 3ynm opened 5 years ago
It's released but we'll let it settle for a while to see if there is large support for it, and if we can change without breaking BC.
Okay so I've gathered:
league/omnipay
, but not with common. So requiring an psr-18 implementation instead of httplug would be breaking perhaps, but Composer would notify users about this, so I guess it's not a big problem?
So to upgrade:
league/omnipay
: https://github.com/thephpleague/omnipay/pull/556omnipay/tests
I'm playing with PSR-15, PSR-17 and PSR-18 on a Xero API at the moment to understand how it all works, and it seems good so far.
See #207
@barryvdh
* The new adapters support both httplug and psr-18, so with new versions we can use both: [thephpleague/omnipay#556](https://github.com/thephpleague/omnipay/pull/556)
We could add deprecation notices?, so we don't have to bother supporting old packages when jumping to V4
* We provide our own interface, so for gateways it doesn't matter.
I think it should. PSRs are proposed as an "standarized framework", so you don't need to learn the workings of different APIs on every project. I think we should point towards usage of PSR only interfaces in case of HTTP, but not breaking compatibility without a major version increment.
* We use discovery + require the httplug implementation. With 1.6 of discovery, it's possible to discover psr-18 client the same way (see https://php-http.readthedocs.io/en/latest/discovery.html#psr-18-client-discovery)
Nice :smile:
* We provide a default adapter in `league/omnipay`, but not with common. So requiring an psr-18 implementation instead of httplug would be breaking perhaps, but Composer would notify users about this, so I guess it's not a big problem?
Well... maybe it will be painful for some people and is not an smart movement if you don't pretend to increase the major version number in
league/omnipay
... I think we should not break anything, but add support to new functionality so we increase only a minor version number in this package (3.1.0).* We haven't typehinted the client for this reason, as the signature is also the same it shouldn't be a problem. But the PSR-7 Factory is deprecated and that is typehinted.. The signature is similar so I guess we could remove the typehint as long no one extends the Client.
Again, deprecation notices would be great. I think having an extensible client is sweet.
The interface is the same, so it doesn't matter we support both packages.
Actually, removing the typehint in the constructor isn't breaking (only in methods). So if we don't add the final, it should be fine.
Plz check #208
Any progress here? Using these interfaces is kinda unsightly. I would highly advise for simply moving to PSR-18 fully.
Which interfaces?
Omnipay's HttpClient uses a custom interface
Any update on this? Can we use PSR-18 in omnipay or do we need to wait on the MR https://github.com/thephpleague/omnipay-common/pull/207 ?
It looks a bit similar with https://github.com/thephpleague/omnipay-common/pull/207 && https://github.com/thephpleague/omnipay-common/issues/262 Any plans for progress here?
Omnipay\Common\Http\Client
says that it will be changed to comply with PSR-18 when released. It's been released in last october. So it's just a reminder.I must clarify, I don't know if it's needed, just saw this on the sourcecode.