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
Commits
165ba7ec
Unverified
Commit
165ba7ec
authored
6 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2795789
by Fabianx, jibran, dawehner, alexpott: Do not rebuild the container so often in BTB
parent
d4f1cb5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+7
-4
7 additions, 4 deletions
core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
with
7 additions
and
4 deletions
core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+
7
−
4
View file @
165ba7ec
...
...
@@ -383,10 +383,13 @@ protected function initUserSession() {
*/
protected
function
initKernel
(
Request
$request
)
{
$this
->
kernel
=
DrupalKernel
::
createFromRequest
(
$request
,
$this
->
classLoader
,
'prod'
,
TRUE
);
$this
->
kernel
->
prepareLegacyRequest
(
$request
);
// Force the container to be built from scratch instead of loaded from the
// disk. This forces us to not accidentally load the parent site.
return
$this
->
kernel
->
rebuildContainer
();
$this
->
kernel
->
invalidateContainer
();
$this
->
kernel
->
prepareLegacyRequest
(
$request
);
return
\Drupal
::
getContainer
();
}
/**
...
...
@@ -420,8 +423,8 @@ protected function installModulesFromClassProperty(ContainerInterface $container
// The exception message has all the details.
$this
->
fail
(
$e
->
getMessage
());
}
$this
->
rebuild
Container
();
// The container was already rebuilt by the ModuleInstaller.
$this
->
container
=
\Drupal
::
get
Container
();
}
}
...
...
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