Skip to content
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

Fixing casting for list types that are not in pagers #539

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

douglasmiller
Copy link
Contributor

Fixes a bug with casting responses with array values that do not contain the object key. This functionality has not been encountered previously as all current arrays have contained resources with the object key.

$item_class = static::hintArrayType($setter);
if (!preg_match('/^Recurly/', $item_class)) {
if (!preg_match('/^\\\Recurly/', $item_class)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically it's changing from Recurly to \Recurly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what is happening here. This bit of code has actually never been run before. It always should have been \Recurly

@joannasese joannasese self-requested a review September 17, 2020 19:59
Copy link
Contributor

@joannasese joannasese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@joannasese joannasese merged commit 59c69d5 into master Sep 17, 2020
douglasmiller added a commit that referenced this pull request Sep 22, 2020
# Changelog

## [Unreleased](https://github.com/recurly/recurly-client-php/tree/HEAD)

[Full Changelog](3.7.0...HEAD)

**Implemented enhancements:**

- Latest Changes for 2019-10-10 [\#541](#541) ([douglasmiller](https://github.com/douglasmiller))
- Latest Changes for 2019-10-10 \(Automated Exports, additional resource data methods\) [\#537](#537) ([douglasmiller](https://github.com/douglasmiller))

**Fixed bugs:**

- Fixing casting for list types that are not in pagers [\#539](#539) ([douglasmiller](https://github.com/douglasmiller))
@douglasmiller douglasmiller mentioned this pull request Sep 22, 2020
@joannasese joannasese added the V3 v2019-10-10 Client label Feb 11, 2021
@douglasmiller douglasmiller deleted the list-parsing branch September 1, 2022 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug V3 v2019-10-10 Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants