Skip to content

Bump omnipay/common from 2.5.2 to 3.2.1 #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github May 30, 2023

Bumps omnipay/common from 2.5.2 to 3.2.1.

Release notes

Sourced from omnipay/common's releases.

v3.2.1

No release notes provided.

v3.2.0

Support Symfony 6

Remove guzzle adapter

No release notes provided.

Add support for PHP7.2 back

No release notes provided.

Support PHP8 / Symfony 5

Officially test and support PHP8. Drop old PHP versions because of PHPUnit 9

v3.0.5

No release notes provided.

Fix public visibility in Gateway get/setParameter

Fixes #217

Allow Symfony 5

Support Symfony 5

Omnipay v3 Release

v3.0.0 - 2018-05-14

Omnipay 3.0 focuses on separation of the HTTP Client, to be independent of Guzzle. This release brings compatibility with the latest Symfony 3+4 and Laravel 5. The breaking changes for applications using Omnipay are kept to a minimum.

Upgrading applications from Omnipay 2.x to 3.x

Breaking changes

  • The redirect() method no calls exit() after sending the content. This is up to the developer now.
  • An HTTP Client is required. Guzzle will be installed when using omnipay/omnipay, but otherwise you need to required your own implementation (see PHP HTTP Clients)

Added

  • It is now possible to use setAmountInteger(integer $value) to set the amount in the base units of the currency.
  • Support for Money for PHP objects are added, by using setMoney(Money $money) the Amount and Currency are set.

Upgrading Gateways from 2.x to 3.x

The primary difference is the HTTP Client. We are now using HTTPlug (http://httplug.io/) but rely on our own interface.

Breaking changes

  • Change typehint from Guzzle ClientInterface to Omnipay\Common\Http\ClientInterface
  • $client->get('..')/$client->post('..') etc are removed, you can call $client->request('GET', '').
  • No need to call $request->send(), requests are sent directly.

... (truncated)

Upgrade guide

Sourced from omnipay/common's upgrade guide.

Upgrade apps from 2.x to 3.x

  • The redirect() method no longer calls exit() after sending the content. This is up to the developer now.
  • It is now possible to use setAmountInteger(integer $value) and setMoney(Money $money)
  • HTTPPlug is used. Guzzle will be installed when using omnipay/omnipay, otherwise you need to require your own implementation (see http://docs.php-http.org/en/latest/clients.html)
  • The package is renamed from omnipay/omnipay to league/omnipay and no longer installs all gateways by default.

Upgrade Gateways from 2.x to 3.x

The primary difference is the HTTP Client. We are now using HTTPlug (http://httplug.io/) but rely on our own interface.

Breaking

  • Change typehint from Guzzle ClientInterface to Omnipay\Common\Http\ClientInterface
  • $client->get('..')/$client->post('..') etc are removed, you can call $client->request('GET', '').
  • No need to call $request->send(), requests are sent directly.
  • Instead of $client->createRequest(..) you can create+send the request directly with $client->request(..).
  • When sending a JSON body, convert the body to a string with json_encode() and set the correct Content-Type.
  • The response is a PSR-7 Response object. You can call $response->getBody()->getContents() to get the body as a string.
  • $response->json() and $response->xml() are gone, but you can implement the logic directly.
  • An HTTP Client is no longer added by default by omnipay/common, but omnipay/omnipay will add Guzzle. Gateways should not rely on Guzzle or other clients directly.
  • $body should be a string (eg. http_build_query($data) or json_encode($data) instead of just $data).
  • The $headers parameters should be an array (not null, but can be empty)

Examples:

// V2 XML:
 $response = $this->httpClient->post($this->endpoint, null, $data)->send();
 $result = $httpResponse->xml();
// V3 XML:
$response = $this->httpClient->request('POST', $this->endpoint, [], http_build_query($data));
$result = simplexml_load_string($httpResponse->getBody()->getContents());

// Example JSON request:
$response = $this->httpClient->request('POST', $this->endpoint, [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
], json_encode($data));
$result = json_decode($response->getBody()->getContents(), true);

Testing

PHPUnit is upgraded to PHPUnit 6. Common issues:

  • setExpectedException() is removed
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [omnipay/common](https://github.com/thephpleague/omnipay-common) from 2.5.2 to 3.2.1.
- [Release notes](https://github.com/thephpleague/omnipay-common/releases)
- [Upgrade guide](https://github.com/thephpleague/omnipay-common/blob/master/UPGRADE.md)
- [Commits](thephpleague/omnipay-common@2.5.2...v3.2.1)

---
updated-dependencies:
- dependency-name: omnipay/common
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants