-
-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…3510) * [console] Fix #3505: Too few arguments to function on hook updates. * [console] Reoder command chain call. * [console] Rework obtain pending updates.
- Loading branch information
Showing
3 changed files
with
242 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace Drupal\Console\Bootstrap; | ||
|
||
use Symfony\Component\HttpFoundation\Request; | ||
use Drupal\Core\Update\UpdateKernel as DrupalKernelBase; | ||
use Drupal\Core\DependencyInjection\ServiceModifierInterface; | ||
|
||
/** | ||
* Class DrupalUpdateKernel | ||
* | ||
* @package Drupal\Console\Utils | ||
*/ | ||
class DrupalUpdateKernel extends DrupalKernelBase | ||
{ | ||
/** | ||
* @var ServiceModifierInterface[] | ||
*/ | ||
protected $serviceModifiers = []; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function createFromRequest(Request $request, $class_loader, $environment, $allow_dumping = true, $app_root = null) | ||
{ | ||
$kernel = new static($environment, $class_loader, $allow_dumping, $app_root); | ||
static::bootEnvironment($app_root); | ||
$kernel->initializeSettings($request); | ||
$kernel->handle($request); | ||
return $kernel; | ||
} | ||
|
||
/** | ||
* @param \Drupal\Core\DependencyInjection\ServiceModifierInterface $serviceModifier | ||
*/ | ||
public function addServiceModifier(ServiceModifierInterface $serviceModifier) | ||
{ | ||
$this->serviceModifiers[] = $serviceModifier; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getContainerBuilder() | ||
{ | ||
$container = parent::getContainerBuilder(); | ||
foreach ($this->serviceModifiers as $serviceModifier) { | ||
$serviceModifier->alter($container); | ||
} | ||
|
||
return $container; | ||
} | ||
} |
Oops, something went wrong.