Closed (fixed)
Project:
Scheduler
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Apr 2019 at 13:49 UTC
Updated:
13 May 2019 at 12:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
maliknaik commentedComment #4
maliknaik commentedComment #5
maliknaik commentedComment #6
jonathan1055 commentedHI maliknaik
Thanks for the patch. Are you responding to #3042677: Drupal 9 Deprecated Code Report for Scheduler? If so, can you add that as a parent issue and add a comment on that issue, otherwise someone else could duplicate the work.
Also can you remove the part of your patch which covers drupal::url as that is already dealt with in #3048600: Drupal::url() is deprecated, replace with \Drupal\Core\Url object
Thirdly, can you give a link to a change record on drupal.org so that we know exactly what was deprecated and in what release.
Thanks a lot
Jonathan
Comment #7
maliknaik commented@jonathan1055 Here is the updated patch and the link to the change record Date formats API changes
Comment #8
maliknaik commentedComment #9
jonathan1055 commentedThanks for the patch. All works fine.
However I can see that we are using Drupal::service('date.formatter') in six test files already. I think I will add this to the testBase first, then it is simpler to change the test files.
Interesting that the change record does not actually say that format_date() is deprecated. Are there any other doc pages you can find which say when the function will be deprecated?
Comment #10
jonathan1055 commentedHere's a patch which adds the dateFormatter service to SchedulerTestBase and uses that instead of creating $date_formatter in the actual test. I have also made the change in MetaInformation test. There are five other tests which would need this improvement, if you want to do those too?
Comment #12
jonathan1055 commentedThanks. Committed.
Now that I've added the dateformatter object to
SchedulerBrowserTestBasea separate issue can be opened to change the other four tests to use$this->dateFormatteredit: Opened #3054372: Replace Drupal::service('date.formatter') with $this->dateFormatter in tests
Comment #14
jonathan1055 commented