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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!6795
Remove ContainerAwareInterface from DrupalKernel.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Remove ContainerAwareInterface from DrupalKernel.
issue/drupal-3424177:3424177-remove-containerawareinterface-from
into
11.x
Overview
0
Commits
5
Pipelines
5
Changes
3
Open
Dave Long
requested to merge
issue/drupal-3424177:3424177-remove-containerawareinterface-from
into
11.x
1 year ago
Overview
0
Commits
5
Pipelines
5
Changes
3
Expand
Closes
#3424177
0
0
Merge request reports
Compare
11.x
version 4
c4a9d4d2
1 year ago
version 3
88d783d2
1 year ago
version 2
4c54aef3
1 year ago
version 1
a43920f7
1 year ago
11.x (base)
and
latest version
latest version
22e0e9f6
5 commits,
1 year ago
version 4
c4a9d4d2
4 commits,
1 year ago
version 3
88d783d2
3 commits,
1 year ago
version 2
4c54aef3
2 commits,
1 year ago
version 1
a43920f7
1 commit,
1 year ago
3 files
+
4
−
34
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/DrupalKernel.php
+
3
−
24
Options
@@ -549,20 +549,6 @@ public function getContainer() {
return
$this
->
container
;
}
/**
* {@inheritdoc}
*/
public
function
setContainer
(
ContainerInterface
$container
=
NULL
):
void
{
if
(
isset
(
$this
->
container
))
{
throw
new
\Exception
(
'The container should not override an existing container.'
);
}
if
(
$this
->
booted
)
{
throw
new
\Exception
(
'The container cannot be set after a booted kernel.'
);
}
$this
->
container
=
$container
;
}
/**
* {@inheritdoc}
*/
@@ -940,22 +926,15 @@ protected function initializeContainer() {
$all_messages
=
$this
->
container
->
get
(
'messenger'
)
->
all
();
}
// If we haven't booted yet but there is a container, then we're asked to
// boot the container injected via setContainer().
// @see \Drupal\KernelTests\KernelTestBase::setUp()
if
(
isset
(
$this
->
container
)
&&
!
$this
->
booted
)
{
$container
=
$this
->
container
;
}
// If the module list hasn't already been set in updateModules and we are
// not forcing a rebuild, then try and load the container from the cache.
if
(
empty
(
$this
->
moduleList
)
&&
!
$this
->
containerNeedsRebuild
)
{
$container_definition
=
$this
->
getCachedContainerDefinition
();
}
// If there is no
container and no
cached container definition, build a new
//
one from
scratch.
if
(
!
isset
(
$container
)
&&
!
isset
(
$container_definition
))
{
// If there is no cached container definition, build a new
container from
// scratch.
if
(
!
isset
(
$container_definition
))
{
$container
=
$this
->
compileContainer
();
// Only dump the container if dumping is allowed. This is useful for
Loading