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
22 changes: 13 additions & 9 deletions .vortex/installer/src/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
Tui::info('Starting project installation');

Task::action(
label: '⬇️ Downloading Vortex',
label: 'Downloading Vortex',
action: function (): string {
$version = (new Downloader())->download($this->config->get(Config::REPO), $this->config->get(Config::REF), $this->config->get(Config::TMP));
$this->config->set(Config::VERSION, $version);
Expand All @@ -138,25 +138,25 @@ protected function execute(InputInterface $input, OutputInterface $output): int
);

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

Task::action(
label: '📁 Preparing destination directory',
label: 'Preparing destination directory',
action: fn(): array => $this->prepareDestination(),
success: 'Destination directory is ready',
);

Task::action(
label: '➡️ Copying files to the destination directory',
label: 'Copying files to the destination directory',
action: fn() => $this->copyFiles(),
success: 'Files copied to destination directory',
);

Task::action(
label: '🎭 Preparing demo content',
label: 'Preparing demo content',
action: fn(): string|array => $this->handleDemo(),
success: 'Demo content prepared',
);
Expand Down Expand Up @@ -446,8 +446,12 @@ protected function header(): void {
$content .= 'You will be asked a few questions to tailor the configuration to your site.' . PHP_EOL;
$content .= 'No changes will be made until you confirm everything at the end.' . PHP_EOL;
$content .= PHP_EOL;
$content .= 'If you proceed, some committed files may be modified after confirmation, and you may need to resolve some of the changes manually.' . PHP_EOL;
$content .= PHP_EOL;

if ($this->config->isVortexProject()) {
$content .= 'If you proceed, some committed files may be modified after confirmation, and you may need to resolve some of the changes manually.' . PHP_EOL;
$content .= PHP_EOL;
}

Comment on lines +449 to +454

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

Show the “committed files may be modified” warning also for any existing Git repo, not only Vortex projects

If a non-Vortex project directory is already a Git repo, users can still get modifications/overwrites. Suggest broadening the condition to reduce surprise.

Apply:

-      if ($this->config->isVortexProject()) {
+      if ($this->config->isVortexProject() || $this->isGitRepo($this->config->getDst())) {
         $content .= 'If you proceed, some committed files may be modified after confirmation, and you may need to resolve some of the changes manually.' . PHP_EOL;
         $content .= PHP_EOL;
       }

Add helper (outside this block):

protected function isGitRepo(string $path): bool {
  return is_dir($path . DIRECTORY_SEPARATOR . '.git');
}

🏁 Script executed:

#!/bin/bash
set -e

# Locate InstallCommand.php within the repository
fd InstallCommand.php

# Display the relevant snippet around lines 449–454
sed -n '430,500p' .vortex/installer/src/Command/InstallCommand.php

# Verify existence and signature of getDst in the Config class/interface
grep -R "function getDst" -n .vortex/installer/src

# Locate the declaration of Config to inspect getDst return semantics
grep -R "interface .*Config" -n .vortex/installer/src
grep -R "class .*Config" -n .vortex/installer/src

# Find where isVortexProject is defined to understand its purpose
grep -R "function isVortexProject" -n .vortex/installer/src

# Check if the codebase already handles Git repos elsewhere
grep -R "\.git" -n .vortex/installer

Length of output: 2899


Handle nullable destination when broadening the warning to all Git repos
In the interactive branch of .vortex/installer/src/Command/InstallCommand.php (around lines 449–454), guard against getDst() returning null and include any Git repo:

-      if ($this->config->isVortexProject()) {
+      $dst = $this->config->getDst();
+      if ($this->config->isVortexProject() || ($dst !== null && $this->isGitRepo($dst))) {
         $content .= 'If you proceed, some committed files may be modified after confirmation, and you may need to resolve some of the changes manually.' . PHP_EOL;
         $content .= PHP_EOL;
       }

Add this helper (you can keep it protected since you guard null above):

protected function isGitRepo(string $path): bool {
  return is_dir($path . DIRECTORY_SEPARATOR . '.git');
}
🤖 Prompt for AI Agents
In .vortex/installer/src/Command/InstallCommand.php around lines 449 to 454, the
interactive warning assumes getDst() returns a string and doesn't detect Git
repos when getDst() may be null; update the logic to check for a null
destination before using it, iterate any destination paths and include repos
owned by Git in the warning, and add a protected helper method isGitRepo(string
$path): bool that returns true when the path contains a .git directory; ensure
you call isGitRepo only after confirming getDst() is non-null to avoid type
errors.

$content .= 'Press ' . Tui::yellow('Ctrl+C') . ' at any time to exit the installer.' . PHP_EOL;
$content .= 'Press ' . Tui::yellow('Ctrl+U') . ' at any time to go back to the previous step.' . PHP_EOL;
}
Expand All @@ -460,11 +464,11 @@ public function footer(): void {
$prefix = ' ';

if ($this->config->isVortexProject()) {
$title = 'Finished updating Vortex 🚀🚀🚀';
$title = 'Finished updating Vortex';
$output .= 'Please review the changes and commit the required files.';
}
else {
$title = 'Finished installing Vortex 🚀🚀🚀';
$title = 'Finished installing Vortex';
$output .= 'Next steps:' . PHP_EOL;

// Check for required tools and provide conditional instructions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AiCodeInstructions extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🤖 AI code assistant instructions';
return 'AI code assistant instructions';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/AssignAuthorPr.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AssignAuthorPr extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '👤 Auto-assign the author to their PR?';
return 'Auto-assign the author to their PR?';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/CiProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CiProvider extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🔄 Continuous Integration provider';
return 'Continuous Integration provider';

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

Verify no stray emojis remain across the installer.

Run the scan below to catch any remaining emoji-like glyphs (allows ✓, ✕, ⬆, ⬇ as per tests/prompts).


🏁 Script executed:

#!/bin/bash
set -euo pipefail
python - <<'PY'
import os, sys
root='.vortex/installer'
allow={'✓','✕','⬆','⬇'}
ranges=[(0x1F300,0x1FAFF),(0x1F1E6,0x1F1FF),(0x1F900,0x1F9FF),(0x1F680,0x1F6FF),
        (0x1F700,0x1F77F),(0x2600,0x26FF),(0x2700,0x27BF),(0x1FA70,0x1FAFF),(0x1F300,0x1F5FF)]
VS16=0xFE0F; ZWJ=0x200D
def is_emoji(cp):
  if cp in (VS16, ZWJ): return True
  for a,b in ranges:
    if a<=cp<=b: return True
  return False
hits=0
for dp, dns, fns in os.walk(root):
  dns[:]=[d for d in dns if d not in ('.git','vendor','node_modules','build','dist')]
  for fn in fns:
    p=os.path.join(dp,fn)
    try:
      with open(p,'r',encoding='utf-8',errors='ignore') as f:
        for i,line in enumerate(f,1):
          chars=[ch for ch in line if ch not in allow and is_emoji(ord(ch))]
          if chars:
            print(f'{p}:{i}: ' + ''.join(chars).encode('unicode_escape').decode('ascii') + ' -> ' + line.strip())
            hits+=1
    except Exception: pass
if hits: 
  print(f'Found {hits} emoji-like characters', file=sys.stderr); sys.exit(1)
print('No non-allowed emoji found.')
PY

Length of output: 1451


Remove non-allowed emoji-like characters

Found 15 non-allowed emoji across the installer; remove or replace the following occurrences:

  • .vortex/installer/src/Utils/Task.php:49 — ✦
  • .vortex/installer/tests/Unit/ConverterTest.php:52 — 😀
  • .vortex/installer/tests/Unit/StringsTest.php:26 — ⚙️
  • .vortex/installer/tests/Unit/StringsTest.php:27 — ⚙️
  • .vortex/installer/tests/Unit/StringsTest.php:44 — 🚀🚀🚀
  • .vortex/installer/tests/Unit/StringsTest.php:821 — 🌍
  • .vortex/installer/tests/Unit/StringsTest.php:822 — 🔹
  • .vortex/installer/tests/Unit/StringsTest.php:823 — ✨
  • .vortex/installer/tests/Unit/StringsTest.php:825 — 🔹/✨/🌍 sequence
  • .vortex/installer/tests/Unit/TuiTest.php:460 — 🌟
  • .vortex/installer/tests/Unit/TuiTest.php:470 — 🌟
  • .vortex/installer/tests/Unit/TuiTest.php:611 — 🌟
  • .vortex/installer/tests/Unit/TuiTest.php:651 — 🌟
  • .vortex/installer/tests/Unit/TuiTest.php:887 — 🌟
  • .vortex/installer/tests/Unit/TuiTest.php:888 — 🌟
🤖 Prompt for AI Agents
.vortex/installer/src/Prompts/Handlers/CiProvider.php around line 21 and the
other listed files/lines (.vortex/installer/src/Utils/Task.php:49,
.vortex/installer/tests/Unit/ConverterTest.php:52,
.vortex/installer/tests/Unit/StringsTest.php:26,27,44,821,822,823,825, and
.vortex/installer/tests/Unit/TuiTest.php:460,470,611,651,887,888): remove the
non-allowed emoji-like characters and replace them with plain text equivalents
or simple ASCII symbols; for each occurrence, edit the string literal to remove
the emoji (e.g., replace "✦" with "*" or "bullet", "😀" with "smiley" or omit,
"⚙️" with "gear" or "settings", "🚀" with "rocket" or "launch", "🌍" with
"world", "🔹" with "-" or "diamond", "✨" with "sparkle" or omit, "🌟" with
"star"), run tests to ensure no encoding issues, and commit the changes.

}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/CodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CodeProvider extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🗄️ Repository provider';
return 'Repository provider';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DatabaseDownloadSource extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '📡 Database source';
return 'Database source';
}

/**
Expand All @@ -40,12 +40,12 @@ public function hint(array $responses): ?string {
*/
public function options(array $responses): ?array {
$options = [
self::URL => '🌍 URL download',
self::FTP => '📂 FTP download',
self::ACQUIA => '💧 Acquia backup',
self::LAGOON => '🌊 Lagoon environment',
self::CONTAINER_REGISTRY => '🐳 Container registry',
self::NONE => '🚫 None',
self::URL => 'URL download',
self::FTP => 'FTP download',
self::ACQUIA => 'Acquia backup',
self::LAGOON => 'Lagoon environment',
self::CONTAINER_REGISTRY => 'Container registry',
self::NONE => 'None',
];

if (isset($responses[HostingProvider::id()])) {
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/DatabaseImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DatabaseImage extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🏷️ What is your database container image name and a tag?';
return 'What is your database container image name and a tag?';
}
Comment on lines 17 to 19

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)

Minor grammar tweak for clarity

Drop the article before “tag”.

-    return 'What is your database container image name and a tag?';
+    return 'What is your database container image name and tag?';
📝 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 label(): string {
return '🏷️ What is your database container image name and a tag?';
return 'What is your database container image name and a tag?';
}
public function label(): string {
return 'What is your database container image name and tag?';
}
🤖 Prompt for AI Agents
.vortex/installer/src/Prompts/Handlers/DatabaseImage.php around lines 17-19: the
prompt string currently reads "What is your database container image name and a
tag?"; remove the extra article so it reads "What is your database container
image name and tag?" — update the returned string accordingly to improve grammar
and clarity.


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DependencyUpdatesProvider extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '⬆️ Dependency updates provider';
return 'Dependency updates provider';
}

/**
Expand All @@ -33,9 +33,9 @@ public function hint(array $responses): ?string {
*/
public function options(array $responses): ?array {
return [
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',
];
}

Expand Down
10 changes: 5 additions & 5 deletions .vortex/installer/src/Prompts/Handlers/DeployType.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DeployType extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🚚 Deployment types';
return 'Deployment types';
}

/**
Expand All @@ -37,10 +37,10 @@ public function hint(array $responses): ?string {
*/
public function options(array $responses): ?array {
$options = [
self::ARTIFACT => '📦 Code artifact',
self::LAGOON => '🌊 Lagoon webhook',
self::CONTAINER_IMAGE => '🐳 Container image',
self::WEBHOOK => '🌐 Custom webhook',
self::ARTIFACT => 'Code artifact',
self::LAGOON => 'Lagoon webhook',
self::CONTAINER_IMAGE => 'Container image',
self::WEBHOOK => 'Custom webhook',
];

// Remove Lagoon option for Acquia hosting.
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/Domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Domain extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🌐 Public domain';
return 'Public domain';
}

/**
Expand Down
10 changes: 5 additions & 5 deletions .vortex/installer/src/Prompts/Handlers/HostingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class HostingProvider extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '☁️ Hosting provider';
return 'Hosting provider';
}

/**
Expand All @@ -44,10 +44,10 @@ public function isRequired(): bool {
*/
public function options(array $responses): ?array {
return [
self::ACQUIA => '💧 Acquia Cloud',
self::LAGOON => '🌊 Lagoon',
self::OTHER => '🧩 Other',
self::NONE => '🚫 None',
self::ACQUIA => 'Acquia Cloud',
self::LAGOON => 'Lagoon',
self::OTHER => 'Other',
self::NONE => 'None',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LabelMergeConflictsPr extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🎫 Auto-add a CONFLICT label to a PR when conflicts occur?';
return 'Auto-add a CONFLICT label to a PR when conflicts occur?';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/MachineName.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MachineName extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🏷️ Site machine name';
return 'Site machine name';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/ModulePrefix.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ModulePrefix extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🧩 Module prefix';
return 'Module prefix';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Name extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🏷️ Site name';
return 'Site name';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/Org.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Org extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🏢 Organization name';
return 'Organization name';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/OrgMachineName.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class OrgMachineName extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🏢 Organization machine name';
return 'Organization machine name';
}
Comment on lines 16 to 18

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)

Consistency: US vs UK spelling

Label uses “Organization” while the validation message elsewhere says “organisation.” Consider standardizing across prompts.

🤖 Prompt for AI Agents
In .vortex/installer/src/Prompts/Handlers/OrgMachineName.php around lines 16 to
18, the label string uses US spelling "Organization" while validation messages
elsewhere use UK spelling "organisation"; update the label to use the same UK
spelling ("Organisation machine name") to match existing validation messages (or
alternatively change the validation message if the team standard is US), and
ensure any other prompt labels in this prompts/handlers directory are audited
and made consistent with the chosen spelling.


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PreserveDocsOnboarding extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '📋 Preserve onboarding checklist?';
return 'Preserve onboarding checklist?';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PreserveDocsProject extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '📚 Preserve project documentation?';
return 'Preserve project documentation?';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Profile extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🧾 Profile';
return 'Profile';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/ProfileCustom.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ProfileCustom extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🧾 Custom profile machine name';
return 'Custom profile machine name';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/ProvisionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ProvisionType extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🦋 Provision type';
return 'Provision type';
}

/**
Expand Down
8 changes: 4 additions & 4 deletions .vortex/installer/src/Prompts/Handlers/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Services extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🔌 Services';
return 'Services';
}

/**
Expand All @@ -34,9 +34,9 @@ public function hint(array $responses): ?string {
*/
public function options(array $responses): ?array {
return [
self::CLAMAV => '🦠 ClamAV',
self::SOLR => '🔍 Solr',
self::VALKEY => '🗃️ Valkey',
self::CLAMAV => 'ClamAV',
self::SOLR => 'Solr',
self::VALKEY => 'Valkey',
];
}

Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Theme extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🎨 Theme machine name';
return 'Theme machine name';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion .vortex/installer/src/Prompts/Handlers/Timezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ class Timezone extends AbstractHandler {
* {@inheritdoc}
*/
public function label(): string {
return '🌍 Timezone';
return 'Timezone';
}

/**
Expand Down
Loading