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

[8.x] Remove mapWithKeys from HTTP Client headers() methods #38643

Merged
merged 1 commit into from
Sep 2, 2021
Merged

[8.x] Remove mapWithKeys from HTTP Client headers() methods #38643

merged 1 commit into from
Sep 2, 2021

Conversation

cnanney
Copy link
Contributor

@cnanney cnanney commented Sep 2, 2021

These headers() methods have been this way since the initial port of ZTTP in 65b8d50. The getHeaders() method in the PSR-7 Request and Response objects already return the headers as string[][], so this mapWithKeys usage is essentially a no-op.

I didn't feel the need to add any specific tests for this, as the header() method is used internally in hasHeader(), which is tested directly or indirectly 21 times in HttpClientTest, sufficient to show that the expected header array is the same as it was before.

@cnanney cnanney changed the title Remove mapWithKeys from HTTP Client Request and Response headers() methods [8.x] Remove mapWithKeys from HTTP Client headers() methods Sep 2, 2021
@taylorotwell taylorotwell merged commit 782cef2 into laravel:8.x Sep 2, 2021
@cnanney cnanney deleted the response-map-with-keys branch September 2, 2021 14:37
victorvilella pushed a commit to cdsistemas/framework that referenced this pull request Oct 12, 2021
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