Skip to content
Snippets Groups Projects

Issue #3267577: Clean up in hook_uninstall

1 unresolved thread
4 files
+ 22
29
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -3,8 +3,6 @@
namespace Drupal\package_manager;
use Drupal\Core\Extension\ModuleUninstallValidatorInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
@@ -13,24 +11,12 @@ use Symfony\Component\DependencyInjection\ContainerAwareTrait;
*/
class PackageManagerUninstallValidator implements ModuleUninstallValidatorInterface, ContainerAwareInterface {
use StringTranslationTrait;
use ContainerAwareTrait;
/**
* Constructs a new AutomaticUpdatesUninstallValidator object.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation
* The string translation service.
*/
public function __construct(TranslationInterface $translation) {
$this->setStringTranslation($translation);
}
/**
* {@inheritdoc}
*/
public function validate($module) {
$stage = new Stage(
$this->container->get('config.factory'),
$this->container->get('package_manager.path_locator'),
@@ -42,7 +28,6 @@ class PackageManagerUninstallValidator implements ModuleUninstallValidatorInterf
$this->container->get('tempstore.shared'),
$this->container->get('datetime.time')
);
$reasons = [];
if ($stage->isAvailable() || !$stage->isApplying()) {
return [];
}
Loading