public function ExcludedPathsSubscriber::preCommit in Automatic Updates 8.2
Reacts before staged updates are committed the active directory.
Parameters
\Drupal\automatic_updates\Event\PreCommitEvent $event: The event object.
File
- src/
Event/ ExcludedPathsSubscriber.php, line 69
Class
- ExcludedPathsSubscriber
- Defines an event subscriber to exclude certain paths from update operations.
Namespace
Drupal\automatic_updates\EventCode
public function preCommit(PreCommitEvent $event) : void {
// Don't copy anything from the staging area's sites/default.
// @todo Make this a lot smarter in https://www.drupal.org/i/3228955.
$event
->excludePath('sites/default');
// If the core-vendor-hardening plugin (used in the legacy-project template)
// is present, it may have written a web.config file into the vendor
// directory. We don't want to copy that.
$event
->excludePath('web.config');
}