Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vortex/installer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"composer/composer": "^2.8",
"cweagans/composer-patches": "^1.7",
"czproject/git-php": "^4.3",
"laravel/prompts": "^0.3.5",
"laravel/prompts": "dev-feature/add-description",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Pin the forked laravel/prompts to a commit to ensure reproducible builds.

Tracking a moving dev branch is risky and can break installs unexpectedly, especially with patches enabled.

Example:

-        "laravel/prompts": "dev-feature/add-description",
+        "laravel/prompts": "dev-feature/add-description#<commit-sha>"

Replace with the exact commit you validated.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"laravel/prompts": "dev-feature/add-description",
"laravel/prompts": "dev-feature/add-description#<commit-sha>",
🤖 Prompt for AI Agents
.vortex/installer/composer.json around line 26: the dependency
"laravel/prompts": "dev-feature/add-description" tracks a moving branch; replace
it with a commit-pinned reference to ensure reproducible builds by changing the
version to the branch name suffixed with the validated commit SHA (e.g.
"dev-feature/add-description#<commit-sha>" where <commit-sha> is the exact
commit you verified), save the file and run composer update or composer validate
to lock the dependency.

"nikic/iter": "^2.4",
"sebastian/diff": "*",
"symfony/console": "^7.3",
Expand All @@ -43,6 +43,12 @@
"rector/rector": "^2",
"symfony/finder": "^7.2"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/AlexSkrypnyk/prompts.git"
}
],
Comment on lines +46 to +51

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Restrict the VCS repo to the intended package to reduce supply‑chain blast radius.

Composer supports “only” to scope a repository to specific packages.

-        {
-            "type": "vcs",
-            "url": "https://github.com/AlexSkrypnyk/prompts.git"
-        }
+        {
+            "type": "vcs",
+            "url": "https://github.com/AlexSkrypnyk/prompts.git",
+            "only": ["laravel/prompts"]
+        }

Confirm your Composer version supports “only” (Composer 2.x does). If not, skip this change.


🏁 Script executed:

#!/bin/bash
composer --version

Length of output: 63


Add “only” to restrict the VCS repository to laravel/prompts
Composer 2.x supports the “only” key (tested on v2.5.5).

-        {
-            "type": "vcs",
-            "url": "https://github.com/AlexSkrypnyk/prompts.git"
-        }
+        {
+            "type": "vcs",
+            "url": "https://github.com/AlexSkrypnyk/prompts.git",
+            "only": ["laravel/prompts"]
+        }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"repositories": [
{
"type": "vcs",
"url": "https://github.com/AlexSkrypnyk/prompts.git"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/AlexSkrypnyk/prompts.git",
"only": ["laravel/prompts"]
}
],
🤖 Prompt for AI Agents
.vortex/installer/composer.json around lines 46 to 51: the VCS repository entry
is too broad; add an "only" key restricting it to "laravel/prompts" so Composer
2.x will only use that repository for the specified package. Update the
repository object to include "only": ["laravel/prompts"] while keeping the
existing "type" and "url" fields.

"autoload": {
"psr-4": {
"DrevOps\\VortexInstaller\\": "src/"
Expand Down
35 changes: 20 additions & 15 deletions .vortex/installer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .vortex/installer/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Scope the skip for SimplifyUselessVariableRector instead of disabling globally.

Global skip can hide legitimate cleanups elsewhere. Restrict it to paths where temporary variables aid readability (e.g., prompts/UI), and document the rationale inline.

Apply:

   $config->skip([
@@
-    SimplifyUselessVariableRector::class,
+    // Keep temp vars in prompt/UI code for clarity; Rector may over-simplify them.
+    SimplifyUselessVariableRector::class => [
+      __DIR__ . '/src/Prompts/*',
+      __DIR__ . '/src/Utils/*',
+    ],

Also applies to: 61-61

🤖 Prompt for AI Agents
.vortex/installer/rector.php around lines 17 and 61, the config currently
disables the SimplifyUselessVariableRector globally; instead restrict the skip
to the specific files/directories (e.g., prompt/UI handlers) where temporary
variables are intentionally used for readability, update the skip entry to list
those relative paths or globs, and add an inline comment next to each skipped
path describing why the rule is suppressed for that file (temporary variable
preserves clarity for prompts/UI).

use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
Expand Down Expand Up @@ -57,6 +58,7 @@
NewlineBeforeNewAssignSetRector::class,
RemoveAlwaysTrueIfConditionRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
SimplifyUselessVariableRector::class,
// Dependencies.
'*/vendor/*',
'*/node_modules/*',
Expand Down
42 changes: 19 additions & 23 deletions .vortex/installer/src/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use DrevOps\VortexInstaller\Utils\Downloader;
use DrevOps\VortexInstaller\Utils\Env;
use DrevOps\VortexInstaller\Utils\File;
use DrevOps\VortexInstaller\Utils\Strings;
use DrevOps\VortexInstaller\Utils\Tui;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -51,6 +52,11 @@ class InstallCommand extends Command {
*/
protected Config $config;

/**
* The prompt manager.
*/
protected PromptManager $promptManager;

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -101,15 +107,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->resolveOptions($input->getArguments(), $input->getOptions());

Tui::init($output, !$this->config->getNoInteraction());
$pm = new PromptManager($this->config);
$this->promptManager = new PromptManager($this->config);

static::header();

$pm->runPrompts();
$this->promptManager->runPrompts();

Tui::list($pm->getResponsesSummary(), 'Installation summary');
Tui::list($this->promptManager->getResponsesSummary(), 'Installation summary');

if (!$pm->shouldProceed()) {
if (!$this->promptManager->shouldProceed()) {
Tui::info('Aborting project installation. No files were changed.');

return Command::SUCCESS;
Expand All @@ -132,7 +138,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

Tui::action(
label: '⚙️ Customizing Vortex for your project',
action: fn() => $pm->runProcessors(),
action: fn() => $this->promptManager->runProcessors(),
success: 'Vortex was customized for your project',
);

Expand All @@ -153,9 +159,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
action: fn(): string|array => $this->handleDemo(),
success: 'Demo content prepared',
);

// @todo Implement the demo mode.
// $this->handleDemo();
}
catch (\Exception $exception) {
Tui::output()->setVerbosity(OutputInterface::VERBOSITY_NORMAL);
Expand Down Expand Up @@ -452,36 +455,29 @@ protected function header(): void {

public function footer(): void {
$output = '';
$prefix = ' ';

if ($this->config->isVortexProject()) {
$title = 'Finished updating Vortex 🚀🚀🚀';
$output .= 'Please review the changes and commit the required files.';
}
else {
$title = 'Finished installing Vortex 🚀🚀🚀';
$output .= 'Next steps:' . PHP_EOL;
$output .= PHP_EOL;
$output .= ' Add and commit all files:' . PHP_EOL;
$output .= ' cd ' . $this->config->getDst() . PHP_EOL;
$output .= ' git add -A' . PHP_EOL;
$output .= ' git commit -m "Initial commit."' . PHP_EOL;
$output .= PHP_EOL;

// Check for required tools and provide conditional instructions.
$missing_tools = $this->checkRequiredTools();
if (!empty($missing_tools)) {
$output .= ' Install required tools:' . PHP_EOL;
$tools_output = 'Install required tools:' . PHP_EOL;
foreach ($missing_tools as $tool => $instructions) {
$output .= sprintf(' %s: %s', $tool, $instructions) . PHP_EOL;
$tools_output .= sprintf(' %s: %s', $tool, $instructions) . PHP_EOL;
}
$output .= PHP_EOL;
$tools_output .= PHP_EOL;
$output .= Strings::wrapLines($tools_output, $prefix);
}

$output .= ' Build project locally:' . PHP_EOL;
$output .= ' ahoy build' . PHP_EOL;
$output .= PHP_EOL;
$output .= ' Setup integration with your CI/CD system and hosting:' . PHP_EOL;
$output .= ' See https://www.vortextemplate.com/docs/quickstart';
$output .= PHP_EOL;
// Allow post-install handlers to add their messages.
$output .= Strings::wrapLines($this->promptManager->runPostInstall(), $prefix);
}

Tui::box($output, $title);
Expand Down
7 changes: 7 additions & 0 deletions .vortex/installer/src/Prompts/Handlers/AbstractHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ public function setWebroot(string $webroot): static {
return $this;
}

/**
* {@inheritdoc}
*/
public function postInstall(): ?string {
return NULL;
}

/**
* Check that Vortex is installed for this project.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function label(): string {
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'Helps AI coding assistants to understand the project better.';
return 'Provides AI coding assistants with better context about the project.';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions .vortex/installer/src/Prompts/Handlers/CiProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ public function label(): string {
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'Both providers support equivalent workflow.';
return 'Use ⬆ and ⬇ to select the CI provider.';
}

/**
* {@inheritdoc}
*/
public function options(array $responses): ?array {
$options = [
self::NONE => 'None',
self::GITHUB_ACTIONS => 'GitHub Actions',
self::CIRCLECI => 'CircleCI',
self::NONE => 'None',
];
Comment on lines 34 to 39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix default when GitHub Actions option is hidden

If CodeProvider ≠ GitHub, you unset GHA from options but default() still returns GHA, which can yield an invalid default. Prefer a conditional default.

Apply:

   public function options(array $responses): ?array {
     $options = [
       self::GITHUB_ACTIONS => 'GitHub Actions',
       self::CIRCLECI => 'CircleCI',
       self::NONE => 'None',
     ];

     if (isset($responses[CodeProvider::id()]) && $responses[CodeProvider::id()] !== CodeProvider::GITHUB) {
       unset($options[self::GITHUB_ACTIONS]);
     }

     return $options;
   }

   public function default(array $responses): null|string|bool|array {
-    return self::GITHUB_ACTIONS;
+    return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
+      ? self::GITHUB_ACTIONS
+      : self::CIRCLECI;
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function options(array $responses): ?array {
$options = [
self::NONE => 'None',
self::GITHUB_ACTIONS => 'GitHub Actions',
self::CIRCLECI => 'CircleCI',
self::NONE => 'None',
];
public function options(array $responses): ?array {
$options = [
self::GITHUB_ACTIONS => 'GitHub Actions',
self::CIRCLECI => 'CircleCI',
self::NONE => 'None',
];
if (
isset($responses[CodeProvider::id()]) &&
$responses[CodeProvider::id()] !== CodeProvider::GITHUB
) {
unset($options[self::GITHUB_ACTIONS]);
}
return $options;
}
public function default(array $responses): null|string|bool|array {
return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
? self::GITHUB_ACTIONS
: self::CIRCLECI;
}
🤖 Prompt for AI Agents
In .vortex/installer/src/Prompts/Handlers/CiProvider.php around lines 34–39, the
options list may have GitHub Actions removed but default() still returns GitHub
Actions; change default selection to be conditional on the computed $options
(e.g. if the GITHUB_ACTIONS key exists use it, otherwise fall back to a safe
choice such as self::NONE or the first key from $options). Ensure default()
checks array_key_exists/isset on the chosen key and never returns a value that
was unset from $options.


if (isset($responses[CodeProvider::id()]) && $responses[CodeProvider::id()] !== CodeProvider::GITHUB) {
Expand Down
9 changes: 8 additions & 1 deletion .vortex/installer/src/Prompts/Handlers/CodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ public function label(): string {
/**
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
public static function description(array $responses): string {
return 'Vortex offers full automation with GitHub, while support for other providers is limited.';
}

/**
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'Use ⬆ and ⬇ to select your code repository provider.';
}

/**
* {@inheritdoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function label(): string {
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'The database can be downloaded as an exported dump file or pre-packaged in a container image.';
return 'Use ⬆ and ⬇ to select the database download source.';
}
Comment on lines +35 to 36

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

UI text and emoji updates LGTM; verify consistency and terminal rendering

  • Ensure all handlers now use “🚫 None” for the None option and the same “Use ⬆ and ⬇ …” hint style.
  • Confirm arrows/emojis render acceptably in minimal terminals and in any snapshots/docs.

Also applies to: 48-49

🤖 Prompt for AI Agents
In .vortex/installer/src/Prompts/Handlers/DatabaseDownloadSource.php around
lines 35-36 and 48-49, ensure the displayed None option label and the hint text
are consistent with other handlers: change the None option label to "🚫 None"
(replace any plain "None" or different emoji) and make the hint exactly "Use ⬆
and ⬇ to select the database download source."; also add a minimal-terminal
fallback by providing plain-text equivalents (e.g., "(None)" and "Use up/down
arrows to select the database download source.") used when terminal does not
support emoji, and update any related snapshots/docs to reflect these string
changes.


/**
Expand All @@ -45,7 +45,7 @@ public function options(array $responses): ?array {
self::ACQUIA => '💧 Acquia backup',
self::LAGOON => '🌊 Lagoon environment',
self::CONTAINER_REGISTRY => '🐳 Container registry',
self::NONE => '🙅 None',
self::NONE => '🚫 None',
];

if (isset($responses[HostingProvider::id()])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public function label(): string {
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'Use a self-hosted service if you cannot install a GitHub app.';
return 'Use ⬆ and ⬇ to select the dependency updates provider.';
}

/**
* {@inheritdoc}
*/
public function options(array $responses): ?array {
return [
self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
self::NONE => '🚫 None',
];
Comment on lines 36 to 39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Nit: double space in label

There’s an extra space after “+”.

-      self::RENOVATEBOT_CI => '🤖 +  🔄 Renovate self-hosted in CI',
+      self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
self::NONE => '🚫 None',
];
self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
self::NONE => '🚫 None',
];
🤖 Prompt for AI Agents
.vortex/installer/src/Prompts/Handlers/DependencyUpdatesProvider.php around
lines 36 to 39: the label string for self::RENOVATEBOT_CI contains an extra
space after the "+" ("🤖 +  🔄 Renovate self-hosted in CI"); remove the
unintended extra space so it reads "🤖 + 🔄 Renovate self-hosted in CI" (ensure
only a single space on either side of the "+" as desired).

}
Expand All @@ -43,7 +43,7 @@ public function options(array $responses): ?array {
* {@inheritdoc}
*/
public function default(array $responses): null|string|bool|array {
return self::RENOVATEBOT_CI;
return self::RENOVATEBOT_APP;
}
Comment on lines 45 to 47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Default should depend on repository provider

Defaulting to GitHub App when the repo provider is not GitHub is misleading. Hide the App option and default to CI when CodeProvider ≠ GitHub.

   public function options(array $responses): ?array {
-    return [
-      self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
-      self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
-      self::NONE => '🚫 None',
-    ];
+    $opts = [
+      self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
+      self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
+      self::NONE => '🚫 None',
+    ];
+    if (($responses[CodeProvider::id()] ?? null) !== CodeProvider::GITHUB) {
+      unset($opts[self::RENOVATEBOT_APP]);
+    }
+    return $opts;
   }
   public function default(array $responses): null|string|bool|array {
-    return self::RENOVATEBOT_APP;
+    return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
+      ? self::RENOVATEBOT_APP
+      : self::RENOVATEBOT_CI;
   }

Note: CodeProvider is in the same namespace; no import needed.


🏁 Script executed:

#!/bin/bash
set -e

# Locate DependencyUpdatesProvider.php
DUP=$(fd DependencyUpdatesProvider.php) || { echo "DependencyUpdatesProvider.php not found"; exit 1; }
echo "=== DependencyUpdatesProvider.php ($DUP) header ==="
sed -n '1,50p' "$DUP"

# Locate CodeProvider.php
CP=$(fd CodeProvider.php) || { echo "CodeProvider.php not found"; exit 1; }
echo "=== CodeProvider.php ($CP) header and contents ==="
sed -n '1,200p' "$CP"

# Extract GITHUB constant and id() method
echo "=== CodeProvider constants and id() method ==="
rg -n 'const\s+GITHUB' "$CP"
rg -n 'function\s+id' "$CP"

Length of output: 218


🏁 Script executed:

#!/bin/bash
set -e

echo "Finding relevant PHP files..."
find . -type f \( -iname 'DependencyUpdatesProvider.php' -o -iname 'CodeProvider.php' \) > /tmp/found_files.txt

if [[ ! -s /tmp/found_files.txt ]]; then
  echo "No files found." >&2
  exit 1
fi

echo "Files located:"
cat /tmp/found_files.txt

while read -r file; do
  echo -e "\n=== $file (first 200 lines) ==="
  sed -n '1,200p' "$file"
done < /tmp/found_files.txt

Length of output: 5121


🏁 Script executed:

#!/bin/bash
set -e

# Locate AbstractHandler
AH=$(find . -type f -iname AbstractHandler.php | head -n1) || { echo "AbstractHandler.php not found"; exit 1; }
echo "=== AbstractHandler ($AH) ==="
sed -n '1,200p' "$AH"

echo "=== id() method definition ==="
rg -n "function\s\+id" "$AH" -n -C2

Length of output: 4523


Depend on repository provider for default and options

  • In DependencyUpdatesProvider::options(), remove the GitHub App choice when CodeProvider::id()CodeProvider::GITHUB.
  • In DependencyUpdatesProvider::default(), return RENOVATEBOT_APP only for GitHub; otherwise return RENOVATEBOT_CI.
  • No import required—both classes share the same namespace.
 public function options(array $responses): ?array {
-  return [
-    self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
-    self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
-    self::NONE => '🚫 None',
-  ];
+  $opts = [
+    self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
+    self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
+    self::NONE => '🚫 None',
+  ];
+  if (($responses[CodeProvider::id()] ?? null) !== CodeProvider::GITHUB) {
+    unset($opts[self::RENOVATEBOT_APP]);
+  }
+  return $opts;
 }

 public function default(array $responses): null|string|bool|array {
-  return self::RENOVATEBOT_APP;
+  return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
+    ? self::RENOVATEBOT_APP
+    : self::RENOVATEBOT_CI;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function default(array $responses): null|string|bool|array {
return self::RENOVATEBOT_CI;
return self::RENOVATEBOT_APP;
}
public function options(array $responses): ?array {
$opts = [
self::RENOVATEBOT_APP => '🤖 Renovate GitHub app',
self::RENOVATEBOT_CI => '🤖 + 🔄 Renovate self-hosted in CI',
self::NONE => '🚫 None',
];
if (($responses[CodeProvider::id()] ?? null) !== CodeProvider::GITHUB) {
unset($opts[self::RENOVATEBOT_APP]);
}
return $opts;
}
public function default(array $responses): null|string|bool|array {
return (($responses[CodeProvider::id()] ?? null) === CodeProvider::GITHUB)
? self::RENOVATEBOT_APP
: self::RENOVATEBOT_CI;
}
🤖 Prompt for AI Agents
.vortex/installer/src/Prompts/Handlers/DependencyUpdatesProvider.php around
lines 45-47: update logic to depend on the repository provider; in the options()
method remove the GitHub App choice when CodeProvider::id() !==
CodeProvider::GITHUB (i.e., only include the GitHub App option for GitHub
providers), and in the default(array $responses) method return
self::RENOVATEBOT_APP only when CodeProvider::id() === CodeProvider::GITHUB,
otherwise return self::RENOVATEBOT_CI; no additional imports are needed since
both classes share the namespace.


/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/DeployType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function label(): string {
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'You can deploy code using one or more methods.';
return 'Use ⬆, ⬇ and Space bar to select one or more deployment types.';
}
Comment on lines 31 to 33

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Clarify navigation: include Enter to submit selection.

Multi-select UIs typically require Enter to continue; add it for consistency and to reduce confusion.

-    return 'Use ⬆, ⬇ and Space bar to select one or more deployment types.';
+    return 'Use ⬆, ⬇ to navigate, Space to toggle, Enter to continue.';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function hint(array $responses): ?string {
return 'You can deploy code using one or more methods.';
return 'Use ⬆, ⬇ and Space bar to select one or more deployment types.';
}
public function hint(array $responses): ?string {
return 'Use ⬆, ⬇ to navigate, Space to toggle, Enter to continue.';
}
🤖 Prompt for AI Agents
In .vortex/installer/src/Prompts/Handlers/DeployType.php around lines 31 to 33,
the hint text only mentions using the arrow keys and Space to select items but
omits that pressing Enter submits the selection; update the returned hint string
to include Enter (e.g., "Use ⬆, ⬇ and Space bar to select one or more deployment
types, then press Enter to submit.") so users know how to continue after making
their selection.


/**
Expand Down
7 changes: 6 additions & 1 deletion .vortex/installer/src/Prompts/Handlers/HandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function transform(): ?callable;
*
* If this returns a non-empty value, the caller should use this value
* instead of prompting the user for input. This allows handlers to
* encapsulate logic for when values are discovered from environment,
* encapsulate logic for when values are discovered from the environment,
* auto-selected based on other responses, or otherwise pre-determined.
*
* @param array $responses
Expand Down Expand Up @@ -177,4 +177,9 @@ public function setWebroot(string $webroot): static;
*/
public function process(): void;

/**
* Actions to perform and messages to print after installation is complete.
*/
public function postInstall(): ?string;

}
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/HostingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function label(): string {
* {@inheritdoc}
*/
public function hint(array $responses): ?string {
return 'Select the hosting provider where the project is hosted. The web root directory will be set accordingly.';
return 'Use ⬆, ⬇ and Space bar to select your hosting provider.';
}
Comment on lines 31 to 33

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Single-select hint is misleading; Space isn’t used for selection here.

This prompt is single-select. Mention Enter instead of Space to avoid UX confusion.

-    return 'Use ⬆, ⬇ and Space bar to select your hosting provider.';
+    return 'Use ⬆, ⬇ to navigate and Enter to select your hosting provider.';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public function hint(array $responses): ?string {
return 'Select the hosting provider where the project is hosted. The web root directory will be set accordingly.';
return 'Use ⬆, ⬇ and Space bar to select your hosting provider.';
}
public function hint(array $responses): ?string {
return 'Use ⬆, ⬇ to navigate and Enter to select your hosting provider.';
}
🤖 Prompt for AI Agents
In .vortex/installer/src/Prompts/Handlers/HostingProvider.php around lines 31 to
33, the hint string incorrectly tells users to press Space to select a hosting
provider even though this is a single-select prompt; update the hint text to
mention Enter (e.g., "Use ⬆, ⬇ and Enter to select your hosting provider.") so
the instructions match the actual selection behavior.


/**
Expand Down
Loading