Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
789cd65d
Commit
789cd65d
authored
Apr 09, 2020
by
catch
Browse files
Issue
#3126003
by tedbow, alexpott, pfrenssen, lauriii: Increased memory usage during install
(cherry picked from commit
df1d6896
)
parent
5ca020f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/core.services.yml
View file @
789cd65d
...
...
@@ -522,7 +522,7 @@ services:
class
:
Drupal\Core\Extension\ModuleInstaller
tags
:
-
{
name
:
service_collector
,
tag
:
'
module_install.uninstall_validator'
,
call
:
addUninstallValidator
}
arguments
:
[
'
%app.root%'
,
'
@module_handler'
,
'
@kernel'
,
'
@extension.list.theme'
]
arguments
:
[
'
%app.root%'
,
'
@module_handler'
,
'
@kernel'
]
lazy
:
true
extension.list.module
:
class
:
Drupal\Core\Extension\ModuleExtensionList
...
...
core/lib/Drupal/Core/Extension/ModuleInstaller.php
View file @
789cd65d
...
...
@@ -50,13 +50,6 @@ class ModuleInstaller implements ModuleInstallerInterface {
*/
protected
$uninstallValidators
;
/**
* The theme extension list.
*
* @var \Drupal\Core\Extension\ThemeExtensionList
*/
protected
$themeExtensionList
;
/**
* Constructs a new ModuleInstaller instance.
*
...
...
@@ -66,21 +59,14 @@ class ModuleInstaller implements ModuleInstallerInterface {
* The module handler.
* @param \Drupal\Core\DrupalKernelInterface $kernel
* The drupal kernel.
* @param \Drupal\Core\Extension\ThemeExtensionList $extension_list_theme
* The theme extension list.
*
* @see \Drupal\Core\DrupalKernel
* @see \Drupal\Core\CoreServiceProvider
*/
public
function
__construct
(
$root
,
ModuleHandlerInterface
$module_handler
,
DrupalKernelInterface
$kernel
,
ThemeExtensionList
$extension_list_theme
=
NULL
)
{
public
function
__construct
(
$root
,
ModuleHandlerInterface
$module_handler
,
DrupalKernelInterface
$kernel
)
{
$this
->
root
=
$root
;
$this
->
moduleHandler
=
$module_handler
;
$this
->
kernel
=
$kernel
;
if
(
is_null
(
$extension_list_theme
))
{
@
trigger_error
(
'The extension.list.theme service must be passed to '
.
__NAMESPACE__
.
'\ModuleInstaller::__construct(). It was added in drupal:8.9.0 and will be required before drupal:10.0.0.'
,
E_USER_DEPRECATED
);
$extension_list_theme
=
\
Drupal
::
service
(
'extension.list.theme'
);
}
$this
->
themeExtensionList
=
$extension_list_theme
;
}
/**
...
...
@@ -386,7 +372,7 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
}
if
(
$uninstall_dependents
)
{
$theme_list
=
$this
->
themeE
xtension
L
ist
->
getList
();
$theme_list
=
\
Drupal
::
service
(
'e
xtension
.l
ist
.theme'
)
->
getList
();
// Add dependent modules to the list. The new modules will be processed as
// the foreach loop continues.
...
...
@@ -594,7 +580,6 @@ protected function updateKernel($module_filenames) {
// After rebuilding the container we need to update the injected
// dependencies.
$container
=
$this
->
kernel
->
getContainer
();
$this
->
themeExtensionList
=
$container
->
get
(
'extension.list.theme'
);
$this
->
moduleHandler
=
$container
->
get
(
'module_handler'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment