Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
extension system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jan 2018 at 21:11 UTC
Updated:
21 Oct 2019 at 13:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
almaudoh commentedComment #3
alexpottComment #5
alexpottComment #6
andypostComment #7
andypostIt looks great clean-up! Why it needs to update https://www.drupal.org/node/2709919 instead of creating own one?
It becomes hard to track changes (deprecations) when CRs are updated
that's a bit strange that module list used on profile but that's how core works?
Comment #8
claudiu.cristea@andypost, Both services are using the same parent method. However, in order to avoid such confusions let's use the profile service. It should work. I guess the 'module version' was inherited from the deprecated function.
The change record has been updated.
Comment #10
claudiu.cristeaFixed the test.
Comment #11
andypostJust one minor
++, unused here and in child classes
looks like typo
$infobetter to removeComment #13
jhedstromSetting to NW per #11.
Comment #14
claudiu.cristeaFixing stuff.
Comment #15
almaudoh commentedThis will also need updating deprecation messages to 8.8.x
Comment #16
NightHunterSV commentedLooks like some part of the deprecation was already done in #3035274: Deprecate drupal_classloader_register() & system_register()
Comment #17
NightHunterSV commentedUpdated the patch. Please, review
Comment #18
NightHunterSV commentedComment #19
volegerNot really sure about this change. Should we change service call from
extention.list.profiletoextention.list.module? Code in this requirement definition operate with profile info only.Comment #20
vladbo commentedUpdated patch and interdiff.
Comment #21
vladbo commentedComment #23
volegerLooks like Legacy tests need to update their @expectedDeprecation messages.
Comment #24
vladbo commentedRe-roll of the patch
Comment #25
volegerNeeds reroll against the latest branch version.
Comment #26
vladbo commentedRe-roll
Comment #27
vladbo commentedComment #28
berdirThe argument needs to be optional, with a fallback to Drupal::service() and @trigger_error() when it is not set.
A new construct method is especially tricky, because a potential subclass doesn't call it yet and then even the fallback wouldn't work.
Not sure if it's worth here, subclasses seem unlikely. But we could ad d a private method to get the service and do the fallback there.
Comment #29
vladbo commentedHi @berdir,
1. Agree.
2. It won't work. if there is controller that extends AdminController and has own constructor there will be fatal error like this:
ArgumentCountError: Too few arguments to function TestAdminController::__construct(), 0 passed in /var/www/web/core/lib/Drupal/Core/Controller/ControllerBase.php on line 118 and exactly 1 expected in Drupal\test_stuff\Controller\TestAdminController->__construct()In any case, if there are some controllers those extend AdminController their constructor should be fixed.
Comment #30
vladbo commentedSet argument as optional
Comment #31
vladbo commentedComment #32
andypostI think setter here is not needed, admin controller is supposed to know enabled module list
The only thing worry me is naming here - @dawehner already mentioned in other issue is "extension_list_module" vs "moduleExtensionList"
Better to check the naming in other places where "module list" injected already
better to remove it, for 9.x it will be cleaned by trigger_error
Comment #33
alexpottThis is out-of scope.
Fixing the deprecation message format for other functions is out of scope here.
I agree with @andypost - controller constructors are best effort BC - they are not covered by our BC promise.
Comment #34
alexpottRerolled and addressed comments
Comment #35
andypostThe other function already deprecated, i think it ready
Comment #36
andypostComment #37
andypostComment #39
catchHad to double check whether this was OK to remove, but it's dead code already from a previous change.
Committed 5be2df4 and pushed to 8.8.x. Thanks!