Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3424701
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
drupal-3424701
Commits
a6ba33b2
Commit
a6ba33b2
authored
1 year ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3424177
by longwave, andypost: Remove ContainerAwareInterface from DrupalKernelInterface
parent
7beb999e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/lib/Drupal/Core/DrupalKernel.php
+3
-24
3 additions, 24 deletions
core/lib/Drupal/Core/DrupalKernel.php
core/lib/Drupal/Core/DrupalKernelInterface.php
+1
-2
1 addition, 2 deletions
core/lib/Drupal/Core/DrupalKernelInterface.php
core/phpstan-baseline.neon
+0
-8
0 additions, 8 deletions
core/phpstan-baseline.neon
with
4 additions
and
34 deletions
core/lib/Drupal/Core/DrupalKernel.php
+
3
−
24
View file @
a6ba33b2
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
core/lib/Drupal/Core/DrupalKernelInterface.php
+
1
−
2
View file @
a6ba33b2
...
...
@@ -2,7 +2,6 @@
namespace
Drupal\Core
;
use
Symfony\Component\DependencyInjection\ContainerAwareInterface
;
use
Symfony\Component\HttpKernel\HttpKernelInterface
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -12,7 +11,7 @@
* This interface extends Symfony's KernelInterface and adds methods for
* responding to modules being enabled or disabled during its lifetime.
*/
interface
DrupalKernelInterface
extends
HttpKernelInterface
,
ContainerAwareInterface
{
interface
DrupalKernelInterface
extends
HttpKernelInterface
{
/**
* Event fired when the service container finished initializing in subrequest.
...
...
This diff is collapsed.
Click to expand it.
core/phpstan-baseline.neon
+
0
−
8
View file @
a6ba33b2
...
...
@@ -432,14 +432,6 @@ parameters:
count: 1
path: lib/Drupal/Core/DrupalKernel.php
-
message: """
#^Interface Drupal\\\\Core\\\\DrupalKernelInterface extends deprecated interface Symfony\\\\Component\\\\DependencyInjection\\\\ContainerAwareInterface\\:
since Symfony 6\\.4, use dependency injection instead$#
"""
count: 1
path: lib/Drupal/Core/DrupalKernelInterface.php
-
message: "#^Method Drupal\\\\Core\\\\Entity\\\\ContentEntityConfirmFormBase\\:\\:save\\(\\) should return int but return statement is missing\\.$#"
count: 1
...
...
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