adding php81 compatibility#65
Open
elminson wants to merge 1 commit into
Open
Conversation
|
See also this similar PR #60 and the update branch: https://github.com/trolley/php-sdk/tree/php-ver-update |
barnett
added a commit
that referenced
this pull request
Jun 2, 2026
# Fixes #66 Prepare the PHP SDK for a non-breaking endpoint coverage release. ## Summary - Bump SDK minor version to `3.1.0`. - Add Trust verification gateway helpers and `trust` alias. - Add documented endpoint helpers/path construction so SDK surface audit covers all public API operations. - Add top-level payment lookup support. - Fix `RecipientAccountGateway::update()` to return `RecipientAccount` instead of `Recipient`. - Add documented response attributes across batch, payment, recipient, recipient account, offline payment, and invoice payment models. - Add PHP 8.1 iterator compatibility to `ResourceCollection` without dropping existing PHP version compatibility. - Set default configuration environment to `production`. ## Open PR/issue review - Included: #66 recipient account update return type. - Partially included: #65 PHP 8.1 compatibility via non-breaking iterator compatibility; did not raise minimum PHP to 8.1. - Included: #61 production default environment behavior. ## Compatibility notes - Existing public methods remain available. - New coverage is additive through helpers, aliases, and model fields. - Minimum PHP requirement remains `>=5.4` to avoid breaking existing users. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Pagination and default `production` environment change runtime behavior for some callers; changes are mostly additive but affect how collections fetch next pages and which API host is used when env was unset. > > **Overview** > Releases **3.1.0** as an additive API-coverage update: new **Trust/verification** gateway (`verification()` and `trust()`), balance helpers (`all`, `paymentrails`, `paypal`), top-level **`PaymentGateway::find`**, and recipient **offline payment** listing with paging. > > **Pagination and collections** are tightened so `foreach` over results keeps the right path context (`batchId`, balance segment, recipient id) and only auto-pages when a pager is configured; **PHP 8.1** iterator compatibility is added via `#[\ReturnTypeWillChange]` without raising the minimum PHP version. > > Models gain documented API fields (e.g. batch `quoteExpiredAt`/`tags`, expanded **Payment** withholding/return fields, invoice payment and recipient account fields). **`RecipientAccountGateway::update`** now returns a **`RecipientAccount`**. Default **`Configuration`** environment is **`production`**. Unit tests cover pagination and model defaults. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 584b365. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
A short description of what this PR does.
Checklist
If you have questions, create a GitHub Issue in this repository.