From b33cda496c5b40b5eff3bd4bffdab526706ee173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=A9na=20Proxima?= Date: Tue, 30 Mar 2021 16:13:55 -0400 Subject: [PATCH] When uninstalling Headless Lightning, make the project depend on the 'eol' branch. --- src/Commands/Uninstaller.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Commands/Uninstaller.php b/src/Commands/Uninstaller.php index 8acaefd6e..04709fc25 100644 --- a/src/Commands/Uninstaller.php +++ b/src/Commands/Uninstaller.php @@ -507,6 +507,13 @@ private function alterProject() : void { 'repositories' => $this->getRepositories($target), ]); + // If the project requires Headless Lightning, we need to switch it to + // Headless Lightning 2 to ensure that the modules which are part of + // Headless Lightning will continue to be present after uninstall. + if (isset($data['require']['acquia/headless_lightning'])) { + $data['require']['acquia/headless_lightning'] = 'dev-eol'; + } + // Delete any empty arrays, since they will be encoded as empty arrays and // may therefore break the composer.json schema. // @todo Handle this recursively.