Skip to content

Fix InputBag deprecation #40614

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

Closed
wants to merge 1 commit into from
Closed

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 5.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

I'm not sure about this PR but there is something wrong between the phpdoc, the deprecation check and the deprecation message. The deprecation message is talking about string value, but the deprecation is only thrown for non-scalar value.

Since you made this comment #34363 (comment) @nicolas-grekas, please review this PR.

Copy link
Member

@jderusse jderusse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTP is all about strings.

get should always return a string, and IMHO the fix would be to cast default to string

Copy link
Contributor

@azjezz azjezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎 for this, the type of $value is going to change to string|Stringable in symfony 6.0, allowing other scalars now in the phpdoc is conflicting with this.

currently we allow scalars at runtime because we want to keep the deprecation "soft" ( since other parameter class used to accept mixed )

@VincentLanglet
Copy link
Contributor Author

👎 for this, the type of $value is going to change to string|Stringable in symfony 6.0, allowing other scalars now in the phpdoc is conflicting with this.

currently we allow scalars at runtime because we want to keep the deprecation "soft" ( since other parameter class used to accept mixed )

Closing then

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.

4 participants