Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Deprecate\Stringable support inInputBag#47087

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedJul 27, 2022
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?no
Deprecations?yes
Tickets#46957 (comment)
LicenseMIT
Doc PRsymfony/symfony-docs#...

As discussed in#46957, it seems there is no valid use case for using\Stringable objects with InputBag.

@chalasrchalasrforce-pushed theinputbag-stringable-deprec branch fromda8fb96 tob854ba4CompareJuly 27, 2022 16:26
@nicolas-grekas
Copy link
Member

Personally I wouldn't merge this PR: this serves no practical purpose to me. I understand the motivation: InputBag represents values that can be found in request payloads, and these can only be strings or array of strings.InputBag in its first merged version allowed onlystrings|null. Then ppl reported that beforeInputBag was introduced, we used aParameterBag, and this one allowed any kind of values. We thus madeInputBag a bit more open and allowed all scalars (whichStringable is a kind of). When we did so, we preserved the original motivation for introducingInputBag (properly dealing with array inputs vs non-array ones) without breaking BC too heavily.

To me, this ship has sailed: yes, we could deprecate all non-string values, since none of them are possible values in raw HTTP. Yet, this would plan for a BC break that I don't see the value of.

@fabpot
Copy link
Member

Then, my recommendation would be to deprecate this class altogether as it's not about HTTP anymore, it's just a bag of things.

@nicolas-grekas
Copy link
Member

Deprecating InputBag would require us to use ParameterBag, which is even less strict. The reason why we introduced InputBag was to behave properly when ppl submitfoo[]=123 instead offoo=123 in the query string. This reason still holds true and InputBag handles the situation as we want it to do.

Another idea might be to deprecate the$default arguments, since it's not needed anymore with the?? operator. But honestly, I don't feel like this is worth it...

To me,#46957 is all that we need on this topic: it fixes a badly removed BC layer.

@chalasr
Copy link
MemberAuthor

While working on this, I felt this it is not worth the noise it does. I agree with Nicolas we'd probably better not change anything

@nicolas-grekas
Copy link
Member

Let's close then :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

4 participants

@chalasr@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp