class PreCommitEvent in Automatic Updates 8.2
Event fired before staged changes are copied into the active site.
Hierarchy
- class \Drupal\automatic_updates\Event\UpdateEvent extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\automatic_updates\Event\PreCommitEvent uses ExcludedPathsTrait
Expanded class hierarchy of PreCommitEvent
3 files declare their use of PreCommitEvent
- StagedProjectsValidator.php in src/
Validator/ StagedProjectsValidator.php - StagedProjectsValidatorTest.php in tests/
src/ Unit/ StagedProjectsValidatorTest.php - Updater.php in src/
Updater.php
File
- src/
Event/ PreCommitEvent.php, line 10
Namespace
Drupal\automatic_updates\EventView source
class PreCommitEvent extends UpdateEvent {
use ExcludedPathsTrait;
/**
* The Composer utility object for the stage directory.
*
* @var \Drupal\package_manager\ComposerUtility
*/
protected $stageComposer;
/**
* Constructs a new PreCommitEvent object.
*
* @param \Drupal\package_manager\ComposerUtility $active_composer
* A Composer utility object for the active directory.
* @param \Drupal\package_manager\ComposerUtility $stage_composer
* A Composer utility object for the stage directory.
*/
public function __construct(ComposerUtility $active_composer, ComposerUtility $stage_composer) {
parent::__construct($active_composer);
$this->stageComposer = $stage_composer;
}
/**
* Returns a Composer utility object for the stage directory.
*
* @return \Drupal\package_manager\ComposerUtility
* The Composer utility object for the stage directory.
*/
public function getStageComposer() : ComposerUtility {
return $this->stageComposer;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExcludedPathsTrait:: |
protected | property | Paths to exclude from the update. | |
ExcludedPathsTrait:: |
public | function | Adds an absolute path to exclude from the update operation. | |
ExcludedPathsTrait:: |
public | function | Returns the paths to exclude from the update operation. | |
PreCommitEvent:: |
protected | property | The Composer utility object for the stage directory. | |
PreCommitEvent:: |
public | function | Returns a Composer utility object for the stage directory. | |
PreCommitEvent:: |
public | function |
Constructs a new PreCommitEvent object. Overrides UpdateEvent:: |
|
UpdateEvent:: |
protected | property | The Composer utility object for the active directory. | |
UpdateEvent:: |
protected | property | The validation results. | |
UpdateEvent:: |
public | function | Adds a validation result. | |
UpdateEvent:: |
public | function | Returns a Composer utility object for the active directory. | |
UpdateEvent:: |
public | function | Gets the validation results. |