Problem/Motivation
We have removed almost all old functions like current_path(), request_path() etc.
request_uri is still there, even we have perfect replacements since always on the $request object
Proposed resolution
Let's replace it and remove request_uri
Remaining tasks
User interface changes
API changes
Beta phase evaluation
| Issue category | Task: Part of cleaning up bootstrap.inc from not needed stuff. |
|---|---|
| Issue priority | Normal, because the impact is low |
| Disruption | Really small disruption, especially because we already have a recommended other API people should use. |
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff.txt | 1.13 KB | dawehner |
| #13 | 2426489-13.patch | 16.66 KB | dawehner |
| #11 | interdiff.txt | 2.78 KB | dawehner |
| #11 | 2426489-11.patch | 16.6 KB | dawehner |
| #7 | interdiff.txt | 678 bytes | dawehner |
Comments
Comment #1
dawehnerLet's see ...
This will need a reroll after #2426457: Remove request_path
Comment #2
dawehnerhttps://www.drupal.org/node/2382211 will need an update once this is in.
Comment #4
dawehner.
Comment #5
dawehnerReroll + fixes.
Comment #7
dawehnerThere we go.
Comment #8
dawehner.
Comment #9
dawehnerWorked on the issue summary / beta evaluation.
Comment #10
Crell commentedRemove or update the comment too, please.
$reuqest? :-)
This in a test seems spurious to me. Tests should be request-agnostic, or able to be. In a test, why don't we just hard-code a request uri for testing purposes? That would be more stable and predictable and less prone to random weirdness.
Technically we could leave the method in place, just change what it's wrapping. I'm fine either way.
We need a beta eval here, but I am +1 on allowing it.
Comment #11
dawehnerJust imagine how hard it was to type it, given that you type $request all day long.
Well, I think that is out of scope to change, but well, here it is.
I see no reason to keep it.
... An additional one to the existing one?
Comment #13
dawehner@crell
I'm sorry but if you really want to fix it, feel free to open up a follow up :p
Comment #14
kgoel commentedsome nitpicks
Should it have getRequestUri for setMethods?
While you are at it, some unused classes in DrupalKernel.php
some unused classes in bootstrap.inc
Comment #15
dawehner@kgoel
You don't use dreditor? This sounds like you would not slack at all ;)
We removed the
getRequestUrimethod in this patch, so we can no longer mock that method.Mh, I still think we should not break other patches due to out of scope changes in this issue, so sorry I won't change that.
Comment #16
dawehner@kgoel
Do you have some additional points or do you think this issue is RTBC?
Comment #17
kgoel commented@dawehner -
I do use dreditor :)
I think you meant request_uri() removed from this patch
Maybe I need to change as how I review patches.
Comment #18
alexpottWe need a change record for this. I consider this change a followup of the numerous criticals to remove Drupal's dependence on
$_SERVERand use the symfony request object everywhere.Comment #19
dawehnerAlright, here is one. https://www.drupal.org/node/2444099
Comment #20
alexpottCommitted d742115 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary. I agree that removing this is inline with moving to Symfony's request processing system and this issue should be considered a followup to that work.
Comment #23
David_Rothstein commentedRemoving that is problematic - see linked issue.