diff --git a/src/StarterKits/Installer.php b/src/StarterKits/Installer.php index be7b6313c7..ec2a6ebf02 100644 --- a/src/StarterKits/Installer.php +++ b/src/StarterKits/Installer.php @@ -548,7 +548,7 @@ function () { */ public function removeStarterKit(): self { - if ($this->isAddon() || $this->disableCleanup) { + if ($this->isUpdatable() || $this->disableCleanup) { return $this; } @@ -589,7 +589,7 @@ protected function completeInstall(): self */ protected function removeRepository(): self { - if ($this->isAddon() || $this->fromLocalRepo || ! $this->url) { + if ($this->isUpdatable() || $this->fromLocalRepo || ! $this->url) { return $this; } @@ -684,10 +684,10 @@ protected function config(?string $key = null): mixed } /** - * Should starter kit be treated as a regular addon, and live on for future composer updates, etc? + * Should starter kit be treated as an updatable package, and live on for future composer updates, etc? */ - protected function isAddon(): bool + protected function isUpdatable(): bool { - return (bool) $this->config('addon'); + return (bool) $this->config('updatable'); } } diff --git a/tests/StarterKits/InstallTest.php b/tests/StarterKits/InstallTest.php index fc697639a8..868d3f11eb 100644 --- a/tests/StarterKits/InstallTest.php +++ b/tests/StarterKits/InstallTest.php @@ -210,10 +210,10 @@ public function it_restores_existing_repositories_after_successful_install() } #[Test] - public function it_installs_as_living_addon_with_custom_config() + public function it_installs_as_living_package_with_custom_config() { $this->setConfig([ - 'addon' => true, // With `addon: true`, kit should live on as composer updatable addon + 'updatable' => true, // With `updatable: true`, kit should live on as composer updatable package 'export_paths' => [ 'copied.md', ], @@ -227,7 +227,7 @@ public function it_installs_as_living_addon_with_custom_config() $this->assertFileExists(base_path('copied.md')); $this->assertComposerJsonDoesntHave('repositories'); - // Keep addon around + // Keep package around $this->assertFileExists($this->kitVendorPath()); // But ensure we still delete backup composer.json, which is only used for error handling purposes @@ -235,10 +235,10 @@ public function it_installs_as_living_addon_with_custom_config() } #[Test] - public function it_leaves_custom_repository_for_living_addon() + public function it_leaves_custom_repository_for_living_packages_that_need_it() { $this->setConfig([ - 'addon' => true, // With `addon: true`, kit should live on as composer updatable addon + 'updatable' => true, // With `updatable: true`, kit should live on as composer updatable package 'export_paths' => [ 'copied.md', ], @@ -256,7 +256,7 @@ public function it_leaves_custom_repository_for_living_addon() $this->assertFileExists(base_path('copied.md')); - // Keep addon around + // Keep package around $this->assertFileExists($this->kitVendorPath()); // As well as custom repository, which will be needed for composer updates, if it was needed for install