You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The PR #42118 introduced the Request::str and Request::string methods.
I think it's a good addition for strict typing.
It make sense that like for the str helper the Request::str() returns a Stringable.
However, I find not very intuitive that string doesn't return an actual string but a Stringable. We'll often have to cast as (string), kinda loosing the goal of adding the method.
What do you think about that? Should we change Request::string return type to string?
Should I create a [10.x] PR?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
The PR #42118 introduced the
Request::str
andRequest::string
methods.I think it's a good addition for strict typing.
It make sense that like for the
str
helper theRequest::str()
returns aStringable
.However, I find not very intuitive that
string
doesn't return an actual string but aStringable
. We'll often have to cast as(string)
, kinda loosing the goal of adding the method.What do you think about that? Should we change
Request::string
return type tostring
?Should I create a
[10.x]
PR?Thanks
Beta Was this translation helpful? Give feedback.
All reactions