Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpClient] Allow to pass user/pw as an array #30556

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

Merged
merged 1 commit into from
Mar 14, 2019

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Mar 13, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Makes the API a bit more "PHPish".

@fabpot
Copy link
Member

fabpot commented Mar 14, 2019

This one needs to be rebased :)

@fabpot
Copy link
Member

fabpot commented Mar 14, 2019

Thank you @dunglas.

@fabpot fabpot merged commit 8d5096a into symfony:master Mar 14, 2019
fabpot added a commit that referenced this pull request Mar 14, 2019
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] Allow to pass user/pw as an array

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes<!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Makes the API a bit more "PHPish".

Commits
-------

8d5096a [HttpClient] Allow to pass user/pw as an array
@javiereguiluz
Copy link
Member

Do we really want to allow two different ways of doing the same thing? Maybe allowing only the use of arrays instead of strings could be enough?

@fabpot
Copy link
Member

fabpot commented Mar 14, 2019

I wouldn't mind having only the array way. Makes sense to me. WDYT @dunglas @nicolas-grekas?

@dunglas
Copy link
Member Author

dunglas commented Mar 14, 2019

Being allowed to pass a string doesn't hurt IMO (as it's a standard), but if we have to choose only one I'll go for the array way too.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Mar 14, 2019

The string is the only thing that the standard describes. The array is only sugar, and leaks actually (you can't use a : in the user, per the standard, and unlike the array may hint you).
The array also doesn't play well with env vars.

I'm for keeping the string of there should be only one.

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants