Problem
drupal_override_server_variables()is supposed to be used before Drupal is bootstrapped.- But yet, the code in D8 tries to retrieve a request from the container in
\Drupal. - Logic error: There cannot be a container in
\Drupal, if you are supposed to use this function before Drupal is bootstrapped. - The entire function is obsolete in the first place, since the Symfony
Requesthas the same code built-in.
Proposed solution
- Remove
drupal_override_server_variables().
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | drupal8.server-override.4.patch | 6.4 KB | sun |
| drupal8.server-override.0.patch | 6.89 KB | sun |
Comments
Comment #1
klausiVerified that no version of Drush uses this function either.
Also verified that drush site-install still works with this patch applied, so this seems indeed obsolete.
Comment #2
larowlanThanks, I think I had moved bits of this into the kernel in 2016629 but nice to know its not needed at all
Comment #3
alexpottdrupal8.server-override.0.patch no longer applies.
Comment #4
sunComment #5
catchYeah Request::create() already does this so it is indeed pointless. Also a shame we kept refactoring this function to 'convert' it to Request instead of looking at what it was actually trying to do.
Committed/pushed to 8.x, thanks!