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

[6.x] Implement ArrayAccess on JsonResponse + TestResponse #30817

Merged
merged 9 commits into from
Dec 11, 2019

Conversation

taylorotwell
Copy link
Member

@taylorotwell taylorotwell commented Dec 11, 2019

When building / testing and JSON API, I like to sometimes interact with the raw JSON payload returned in the response. Normally you would have to access this via $response->original['foo']; however, with this change I implement ArrayAccess on both JsonResponse and TestResponse in order to be able to proxy directly into the response JSON without going through the original property.

image

@taylorotwell taylorotwell merged commit f5c3c60 into 6.x Dec 11, 2019
@taylorotwell taylorotwell deleted the array-access-response branch December 11, 2019 20:27
@GrahamCampbell GrahamCampbell changed the title Implement ArrayAccess on JsonResponse + TestResponse [6.x] Implement ArrayAccess on JsonResponse + TestResponse Dec 11, 2019
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.

1 participant