Skip to content
Snippets Groups Projects

Issue #3437409 ForbidCoreChangesValidator.php

Merged Ted Bowman requested to merge issue/automatic_updates-3437409:3437409-dont-allow-core into 3.0.x
2 files
+ 7
15
Compare changes
  • Side-by-side
  • Inline
Files
2
<?php
declare(strict_types = 1);
declare(strict_types=1);
namespace Drupal\automatic_updates_extensions\Validator;
@@ -25,17 +25,9 @@ final class ForbidCoreChangesValidator implements EventSubscriberInterface {
use StringTranslationTrait;
/**
* Constructs a ForbidCoreChangesValidator object.
*
* @param \Drupal\package_manager\PathLocator $pathLocator
* The path locator service.
* @param \Drupal\package_manager\ComposerInspector $composerInspector
* The Composer inspector service.
*/
public function __construct(
private readonly PathLocator $pathLocator,
private readonly ComposerInspector $composerInspector
private readonly ComposerInspector $composerInspector,
) {}
/**
@@ -78,7 +70,7 @@ final class ForbidCoreChangesValidator implements EventSubscriberInterface {
}
if ($error_messages) {
$event->addError($error_messages, $this->t(
'Updating Drupal Core while updating extensions is currently not supported. Use <a href=":url" >this form</a> to update Drupal core. The following changes were made to the Drupal core packages:',
'Updating Drupal Core while updating extensions is currently not supported. Use <a href=":url">this form</a> to update Drupal core. The following changes were made to the Drupal core packages:',
[':url' => Url::fromRoute('update.report_update')->toString()]
));
}
Loading