Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
datetime.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Feb 2020 at 01:42 UTC
Updated:
29 Feb 2020 at 16:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mpdonadioI'll update https://www.drupal.org/node/2785211 when this lands.
Also created https://github.com/mglaman/phpstan-drupal/pull/115
Comment #3
longwave+1, we aren't going to finish this in the D9 beta window given the complexities discovered so far.
Comment #4
alexpottCommitted and pushed f32344341b to 9.0.x and 8f72af8913 to 8.9.x and 235845c4de to 8.8.x. Thanks!
Backported to 8.8.x as this is a docs fix
Comment #8
catchIf we're not sure it's possible to remove all usages, should we actually undeprecate this (still with a recommendation to use the service), then re-deprecate in 9.x when we've removed all the usages?
Comment #9
alexpottI think it is possible to remove all the usages. But maybe we should update the deprecation message again to say if the Drupal service layer is not present what to do. See #3104566: Implement Server Timing performance metrics for example where we use
$request->server->get('REQUEST_TIME_FLOAT').Comment #10
catchSo I am thinking of Berdir's comment here: https://www.drupal.org/project/drupal/issues/2902895#comment-13461259
Comment #11
mpdonadioI think we can remove all usages, it's just a lot of work. Not wed to the language, but I think the deprecation message can just reference the change record in it (like in FieldMigration). And then we can update the CR to
- Change Drupal 9 to Drupal 10
- Add a "Caveats" section (again, not wed to the word) that lists some situations where pulling from the $request or $_SERVER really is most appropriate, since most(?) of those usages would be edge cases the majority of developers need to use.
?
Comment #12
hardik_patel_12 commentedPatch is failed to apply that's why re-applying patch.
Comment #13
catchJust committed #3113476: Fallback when request is not available on the stack in Time service, so now that replacement is feasible, moving back to fixed.
Comment #14
mpdonadioUpdated the change record, https://www.drupal.org/node/2785211