Skip to content

adding php81 compatibility#65

Open
elminson wants to merge 1 commit into
trolley:masterfrom
elminson:elminson/php81
Open

adding php81 compatibility#65
elminson wants to merge 1 commit into
trolley:masterfrom
elminson:elminson/php81

Conversation

@elminson

Copy link
Copy Markdown

Fixes

A short description of what this PR does.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, create a GitHub Issue in this repository.

@soundslocke

Copy link
Copy Markdown

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants