Closed (duplicate)
Project:
Drupal core
Version:
9.1.x-dev
Component:
update.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
17 Jan 2020 at 06:10 UTC
Updated:
23 Mar 2020 at 17:12 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 #4
Rangaswini commentedComment #5
Rangaswini commentedThank you @Hardik_Patel_12
Ready to update form works fine after applying a patch.
Comment #6
alexpottWhen we add arguments to a constructor like this we make them optional and do a deprecation if called without. See for example the code in \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::__construct() on Drupal 8.9.x
Also new deprecations (for Drupal 10) at the moment will done once 9.1.x opens as the higher priority work is to remove deprecations from Drupal 9.
Comment #7
alexpottThere are also two calls to \Drupal::service('file_system') in UpdateReady.
Comment #8
alexpottRe scoping... to account for #3107001: use dependency injection in UpdateManagerInstall.php and #3106993: use dependency injection in UpdateManagerUpdate.php
This issue should update all these classes together.
Comment #9
hardik_patel_12 commentedUpdating all these classes together and injecting using DI, Kindly review a new patch.
Comment #10
hardik_patel_12 commentedComment #11
alexpott@Hardik_Patel_12 we need to do the deprecate dance as in other constructors - see #6 and because we're add new arguments to a constructor we need a change record too - the change record needs to be linked in the deprecation message too.
Also as @longwave requested in another issue I think we need to ensure that the scope here is inline with discussions on #2729597: [meta] Replace \Drupal with injected services where appropriate in core
Comment #12
kishor_kolekar commentedComment #13
kishor_kolekar commentedwe have updated the patch with trigger message for deprecation,kindly provide us with the appropriate issue link which is currently the issue link.
@alexpott as seen in the below code example.
Comment #14
xjmThanks for your contributions here.
I am closing this as a duplicate of #2729597: [meta] Replace \Drupal with injected services where appropriate in core. You can use the work in the patches from this and similar issues as starting points for new issues scoped by concept.