Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2018 at 22:08 UTC
Updated:
15 Jan 2019 at 19:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jcnventuraThis patch replaces all format_date() calls in tests with calls to $this->container->get('date.formatter')->format().
Comment #3
jcnventuraComment #4
jcnventuraComment #5
jcnventuraForgot one in the midst of these changes to other parts of core.
Comment #6
jcnventuraComment #7
quietone commentedThis adds $date_formatter = $this->container->get('date.formatter') in a few more places. Including adding it to FilterDateTest::setup() since the date formatter is used in most of its methods. Hope that is useful.
Comment #8
andypostwhile thisline changed it needs to use date service instead of deprecated
REQUEST_TIMEComment #9
fenstratAddresses #8.
Comment #10
alexpottThe splitting of issues like
is against the advice of our scoping recommendations. Let's not do this. See https://www.drupal.org/core/scope
I'm going to combine all the issues to the earliest issue - #3008446: Complete the deprecation of format_date()
Comment #11
alexpottComment #12
alexpottCombining all the patches. All the people who have worked on the other issues are already credited here.
Comment #13
alexpottA few minor improvements
Comment #14
alexpottThese changes are of questionable scope. However I think it is okay for some of them to remain because, where we are changing the return of the method, updating the docblock is okay. But the changes to add a docblock to
summaryArgumentare not in scope.Comment #15
alexpottComment #17
volegerThat's a little bit out of scope. But I'm okay with that, as there too much not replaced REQUEST_TIME yet.
Anyway tests are green, and all calls and mentions are properly replaced. +1 for RTBC
Comment #18
alexpottYeah the out-of-scope changes kind of bother me. We really only should be changing things directly in-scope. Especially in run-time code. I realise this was requested in #8 but that it incorrect. Scoped issues that address only one thing are important because when and if things need rolling-back or discussed at a later date makes it easier to make sense. The changes to system.tokens.inc show why this is important - we were still using REQUEST_TIME in this file after #14 - inconsistencies like this become confusing.
If this patch was ready to go I would say that we should just go forward and not fix REUQEST_TIME, BUT we have no deprecation test which is required because:
Comment #19
volegerLooks much better this time. The legacy test also looks good. +1 for rtbc.
Comment #20
volegerComment #22
alexpottComment #23
alexpottNeeded a re-roll after #3019834: Add @trigger_error() to deprecated url/link EntityInterface methods
Comment #24
volegerGreat! RTBC again
Comment #25
catchCommitted 31f9ebf and pushed to 8.7.x. Thanks!
Also thanks for keeping the scope in check here, especially for a New Years Day commit.