-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove the usage of Request::get
#7365
Comments
Request::get
Request::get
Even if we're only using the query for an input. Changing, for instance,
to
is a BC-break since if the user were passing the value in the attributes or the request... So when should we do it ? Also we are generally setting the data in multiple places. As an example,
or can we always use the same input ? If so, changing the input can also be considered as BC-break. |
I would say it can still be valid to ask the attribute, query and request bags without using the Symfony function, but in best case it is placed (early) in a controller where it is known which method is used. |
The following issue #3062 could help. |
Some optimized:
|
In the same way, all the data in retrieve autocomplete items action seems to be passed in the request: In the controller, Also, the #7185 issue is showing that sometimes I find over 60 usage of the Did you plan to make a poc @franmomu ? Any thought @jordisala1991 ? |
It would be nice to change all get to what is needed on 4.x, even if it needs a lot of code. The idea is to reduce that for 5.x if it is possible. So, maybe now we need to fetch a param from 3 places of the request, but in next major we can refactor the code to only be from one place. |
It seems to be that we wont be able to reduce the usage of some of them (which arr frequently used) like _sonata_admin or the idParameters like explained in the previous post. Maybe only half of the get calls can be restricted to the query/request/attributes. But that would require lot of work for small/none gain... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Feature Request
It has been marked as
@internal
in Symfony5.4
and its usage is confusing, we should call explicitly the proper input.The text was updated successfully, but these errors were encountered: