Needs work
Project:
Drupal core
Version:
main
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2020 at 10:51 UTC
Updated:
30 Dec 2023 at 08:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hardik_patel_12 commentedKindly review a patch.
Comment #3
hardik_patel_12 commentedComment #5
hardik_patel_12 commentedKindly review a new patch.
Comment #6
hardik_patel_12 commentedComment #7
longwaveThis should be
@logger.channel.cron.Comment #8
hardik_patel_12 commentedKindly review a new patch.
Comment #9
hardik_patel_12 commentedComment #10
hardik_patel_12 commentedCombining #3104168: Drupal Coding Standards Errors for SystemManager.php
Comment #11
hardik_patel_12 commentedSorry bymistakly done above comment
Comment #12
kishor_kolekar commentedI've re-rolled patch for 9.1
Comment #13
kishor_kolekar commentedsorry please avoid the above patch.
Comment #14
kishor_kolekar commentedComment #15
kishor_kolekar commentedre-rolled patch for 9.1
Comment #21
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Seems now that the service requires arguments it will need a BC layer.
In the constructor they should default to NULL with a trigger_error that it will be required in D11
Which then requires tests for the message.
Change record will also have to be added announcing this service arguments are required.
Comment #22
prem suthar commentedRe-roll the Patch For 10.1x Branch.
Comment #25
angrytoast commentedUpdating to a MR against 11.x and incorporating the BC
trigger_errorwarnings per #21 and https://www.drupal.org/about/core/policies/core-change-policies/drupal-d....Clarification on tests; as of 2023-12-15, https://www.drupal.org/about/core/policies/core-change-policies/drupal-d... states
The suggested tests would fall under only asserting a deprecation message? Is it required?
As I understand it, the change record is still necessary. Just wanted to confirm the test requirement because it seems contradictory.
Comment #26
smustgrave commentedSo kinda,
Relooking at this I'm wondering if we have to do the backwards compatibility dance. If a contrib module could extend this class they won't have the new services we are passing into it so would need some trigger_errors
And those would need simple test cases for the exception message.
Comment #28
angrytoast commentedGotcha, updated the MR with a basic kernel test to assert the deprecation messaging and drafted up a change record.
That looks like it should be enough? Putting back in needs review.
Comment #29
smustgrave commentedDeprecation additions look good to me.
Comment #30
quietone commentedI'm triaging RTBC issues. There is no issue summary here! The only information is the title.
An issue summary really is needed no matter how simple one may think the issue is. It is what helps us at every stage of an issue to complete it and keep track of details.
--
This looks like it should be part of a meta. I say that because we normally do not make such changes by file, they are scoped by the type of change. In this case there would be an issue for changing all instances of logger and all instances of state.
After a very brief search I found #2729597: [meta] Replace \Drupal with injected services where appropriate in core where there are existing issues for logger and state. The work here needs to move to #2981326: Replace non-test usages of \Drupal::logger() with IoC injection and #3123228: Replace non-test usages of \Drupal::state() with IoC injection.
If you are unsure about scope, you can read about Drupal standard practice for how to scope issue. And there is always the option to ask in Drupal slack.