Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
789cd65d
Commit
789cd65d
authored
Apr 9, 2020
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3126003
by tedbow, alexpott, pfrenssen, lauriii: Increased memory usage during install
(cherry picked from commit
df1d6896
)
parent
5ca020f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/core.services.yml
+1
-1
1 addition, 1 deletion
core/core.services.yml
core/lib/Drupal/Core/Extension/ModuleInstaller.php
+2
-17
2 additions, 17 deletions
core/lib/Drupal/Core/Extension/ModuleInstaller.php
with
3 additions
and
18 deletions
core/core.services.yml
+
1
−
1
View file @
789cd65d
...
@@ -522,7 +522,7 @@ services:
...
@@ -522,7 +522,7 @@ services:
class
:
Drupal\Core\Extension\ModuleInstaller
class
:
Drupal\Core\Extension\ModuleInstaller
tags
:
tags
:
-
{
name
:
service_collector
,
tag
:
'
module_install.uninstall_validator'
,
call
:
addUninstallValidator
}
-
{
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
lazy
:
true
extension.list.module
:
extension.list.module
:
class
:
Drupal\Core\Extension\ModuleExtensionList
class
:
Drupal\Core\Extension\ModuleExtensionList
...
...
This diff is collapsed.
Click to expand it.
core/lib/Drupal/Core/Extension/ModuleInstaller.php
+
2
−
17
View file @
789cd65d
...
@@ -50,13 +50,6 @@ class ModuleInstaller implements ModuleInstallerInterface {
...
@@ -50,13 +50,6 @@ class ModuleInstaller implements ModuleInstallerInterface {
*/
*/
protected
$uninstallValidators
;
protected
$uninstallValidators
;
/**
* The theme extension list.
*
* @var \Drupal\Core\Extension\ThemeExtensionList
*/
protected
$themeExtensionList
;
/**
/**
* Constructs a new ModuleInstaller instance.
* Constructs a new ModuleInstaller instance.
*
*
...
@@ -66,21 +59,14 @@ class ModuleInstaller implements ModuleInstallerInterface {
...
@@ -66,21 +59,14 @@ class ModuleInstaller implements ModuleInstallerInterface {
* The module handler.
* The module handler.
* @param \Drupal\Core\DrupalKernelInterface $kernel
* @param \Drupal\Core\DrupalKernelInterface $kernel
* The drupal kernel.
* The drupal kernel.
* @param \Drupal\Core\Extension\ThemeExtensionList $extension_list_theme
* The theme extension list.
*
*
* @see \Drupal\Core\DrupalKernel
* @see \Drupal\Core\DrupalKernel
* @see \Drupal\Core\CoreServiceProvider
* @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
->
root
=
$root
;
$this
->
moduleHandler
=
$module_handler
;
$this
->
moduleHandler
=
$module_handler
;
$this
->
kernel
=
$kernel
;
$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) {
...
@@ -386,7 +372,7 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
}
}
if
(
$uninstall_dependents
)
{
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
// Add dependent modules to the list. The new modules will be processed as
// the foreach loop continues.
// the foreach loop continues.
...
@@ -594,7 +580,6 @@ protected function updateKernel($module_filenames) {
...
@@ -594,7 +580,6 @@ protected function updateKernel($module_filenames) {
// After rebuilding the container we need to update the injected
// After rebuilding the container we need to update the injected
// dependencies.
// dependencies.
$container
=
$this
->
kernel
->
getContainer
();
$container
=
$this
->
kernel
->
getContainer
();
$this
->
themeExtensionList
=
$container
->
get
(
'extension.list.theme'
);
$this
->
moduleHandler
=
$container
->
get
(
'module_handler'
);
$this
->
moduleHandler
=
$container
->
get
(
'module_handler'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment