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

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

Merged
merged 1 commit into from Mar 14, 2019

Conversation

Projects
None yet
5 participants
@dunglas
Copy link
Member

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".

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 13, 2019

@dunglas dunglas force-pushed the dunglas:auth-array branch from 938297c to 760400c Mar 14, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 14, 2019

This one needs to be rebased :)

@dunglas dunglas force-pushed the dunglas:auth-array branch from d98f31c to 8d5096a Mar 14, 2019

@fabpot

fabpot approved these changes Mar 14, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Mar 14, 2019

Thank you @dunglas.

@fabpot fabpot merged commit 8d5096a into symfony:master Mar 14, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Mar 14, 2019

feature #30556 [HttpClient] Allow to pass user/pw as an array (dunglas)
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

This comment has been minimized.

Copy link
Member

javiereguiluz commented Mar 14, 2019

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.