Skip to content

[#2841] Relocated the installer into the 'drevops/vortex-cli' package. - #2856

Merged
AlexSkrypnyk merged 14 commits into
2.xfrom
feature/2841-installer-to-cli
Jul 29, 2026
Merged

[#2841] Relocated the installer into the 'drevops/vortex-cli' package.#2856
AlexSkrypnyk merged 14 commits into
2.xfrom
feature/2841-installer-to-cli

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Jul 29, 2026

Copy link
Copy Markdown
Member

Closes #2841

Summary

A standalone installer becomes the install subcommand of a vortex CLI. Everything named after the installer - the directory, the package, the namespace, the binary, the PHAR, the environment variables, the on-screen copy, the demo video - is renamed to say so. The install flow itself is unchanged: the same prompts in the same order, the same derivations, the same processed files.

Renames

Concern Before After
Directory .vortex/installer .vortex/cli
Package drevops/vortex-installer drevops/vortex-cli
Namespace DrevOps\VortexInstaller\ DrevOps\VortexCli\
Binary installer.php vortex
PHAR build/installer.phar .build/vortex.phar
Downloaded filename installer.php vortex.phar
Endpoints /install, /v1/install, /v2/install unchanged
Test workflow vortex-test-installer.yml vortex-test-cli.yml
Presenter class InstallerPresenter InstallPresenter
Demo video installer.* cli-install.*
Maintenance doc maintenance/installer.mdx maintenance/cli.mdx

Environment variables

Renamed by scope, with a backwards-compatible fallback. CLI-level variables move to VORTEX_CLI_* (VERSION, URL, PATH, URL_CACHE_BUST). Install-command variables move to VORTEX_CLI_INSTALL_* (the 14 Config constants, the PROMPT_<ID> prefix, TEMPLATE_REPO, INTERACTIVE). The superseded VORTEX_INSTALLER_* names still resolve via an ordered prefix map in Env::get() and in vortex-update, and each legacy read emits a one-line deprecation notice naming its replacement. Existing consumer sites keep working.

symfony/process is now declared explicitly in composer.json - it was already used but only resolved transitively through composer/composer.

Version resolution

The version is resolved once, at the application level in the vortex binary, and every consumer reads it from there via $this->getApplication()->getVersion() - the install banner, the release-tag prefix, and the major-compatibility gate. Box substitutes @vortex-cli-version@ when packaging the PHAR, so a version still carrying the placeholder means the CLI is running straight from source, and it resolves to development.

Two consequences of moving that resolution up from the install command's presenter:

  • vortex --version and the install banner now agree in every context. Previously only the banner tidied the unsubstituted placeholder, so running from source printed a raw @vortex-cli-version@ at the CLI level.
  • The version is read through Env::get(Config::VERSION, ...) rather than a raw getenv(), so VORTEX_INSTALLER_VERSION resolves through the same fallback as every other superseded name. A raw getenv() would have silently dropped support for it.

Deviation from the issue's acceptance criteria

The issue listed the VORTEX_INSTALLER_* variable names and the output text as "Deliberately unchanged". Both were deliberately overridden after review, so the criterion "the same test and assertion counts as before the move" no longer holds literally. The gate applied instead: no existing test was removed or weakened; the only additions are the fallback and deprecation-notice coverage.

Baseline was 1605 tests / 5158 assertions; final is 1617 tests / 5177 assertions. That is +12 tests, all covering the new fallback and deprecation notice. Assertions are +19 rather than +20 because one presenter test was rewritten to match the moved version resolution: it asserted that the presenter substituted the placeholder, which is no longer the presenter's job, so it now makes a single assertion that the version is rendered as given.

Reviewer notes

  • Fixture parity: ahoy update-snapshots regenerated all 143 scenarios with Updated: 0 - zero fixture changes, which is the issue's primary acceptance criterion. The two template files touched (.docker/cli.dockerfile, scripts/vortex-tooling.sh) are edited only inside #;< VORTEX_DEV fences that are stripped before fixtures are written.
  • .gitattributes export-ignore was renamed in the same commit as the directory move - this is what keeps the CLI's own source out of scaffolded projects.
  • vortex-release.yml and vortex-test-docs.yml intentionally retain .vortex/installer paths on their other-major (1.x) legs, because 1.x still ships the installer. Only the this-ref legs moved to .vortex/cli.
  • The required-check name changes: the workflow renamed from "Vortex - Test installer" to "Vortex - Test CLI", so branch-protection required-check settings may need updating.
  • The release-installer branch trigger was kept alongside a new release-cli trigger so existing pre-release branch names still work.
  • Most of the ~3400 changed files are pure renames of test fixtures with byte-identical content. CodeRabbit skipped its review for this reason (2983 files against a 300-file limit).

Before / After

BEFORE                                        AFTER
┌─────────────────────────────────────┐      ┌─────────────────────────────────────┐
│ .vortex/installer/                   │      │ .vortex/cli/                         │
│  ├─ installer.php  (binary)          │      │  ├─ vortex          (binary)         │
│  ├─ src/                             │      │  ├─ src/                             │
│  │   └─ DrevOps\VortexInstaller\     │      │  │   └─ DrevOps\VortexCli\            │
│  ├─ tests/                           │      │  ├─ tests/                           │
│  │   └─ Prompts/InstallerPresenter   │      │  │   └─ Prompts/InstallPresenter      │
│  └─ composer.json                    │      │  └─ composer.json                    │
│      "name": "drevops/               │      │      "name": "drevops/               │
│               vortex-installer"      │      │               vortex-cli"            │
└─────────────────────────────────────┘      └─────────────────────────────────────┘

┌─────────────────────────────────────┐      ┌─────────────────────────────────────┐
│ build/installer.phar                 │      │ .build/vortex.phar                   │
└─────────────────────────────────────┘      └─────────────────────────────────────┘

┌─────────────────────────────────────┐      ┌─────────────────────────────────────┐
│ Env vars                             │      │ Env vars                             │
│  VORTEX_INSTALLER_VERSION            │      │  VORTEX_CLI_VERSION                  │
│  VORTEX_INSTALLER_URL                │      │  VORTEX_CLI_URL                      │
│  VORTEX_INSTALLER_PATH               │      │  VORTEX_CLI_PATH                     │
│  VORTEX_INSTALLER_PROMPT_<ID>        │      │  VORTEX_CLI_INSTALL_PROMPT_<ID>      │
│                                       │  ⇢   │   (VORTEX_INSTALLER_* still resolves │
│                                       │      │    via a fallback + deprecation      │
│                                       │      │    notice)                           │
└─────────────────────────────────────┘      └─────────────────────────────────────┘

┌─────────────────────────────────────┐      ┌─────────────────────────────────────┐
│ Version resolution                   │      │ Version resolution                   │
│  vortex (binary)                     │      │  vortex (binary)                     │
│   └─ getenv(VORTEX_INSTALLER_VERSION)│      │   └─ Env::get(Config::VERSION)       │
│        │                             │      │        │  (legacy name falls back)   │
│        ▼                             │      │        ▼                             │
│  Application version                 │      │  Application version                 │
│   ├─ vortex --version → raw token    │      │   ├─ vortex --version → development  │
│   └─ InstallPresenter                │      │   └─ InstallPresenter                │
│        └─ tidies token → development │      │        └─ renders as given           │
└─────────────────────────────────────┘      └─────────────────────────────────────┘

┌─────────────────────────────────────┐      ┌─────────────────────────────────────┐
│ Endpoints (unchanged)                │      │ Endpoints (unchanged)                │
│  /install    → installer.php         │      │  /install    → vortex.phar           │
│  /v1/install → installer.php         │      │  /v1/install → vortex.phar           │
│  /v2/install → installer.php         │      │  /v2/install → vortex.phar           │
└─────────────────────────────────────┘      └─────────────────────────────────────┘

┌─────────────────────────────────────┐      ┌─────────────────────────────────────┐
│ CI                                   │      │ CI                                   │
│  vortex-test-installer.yml           │      │  vortex-test-cli.yml                 │
│  "Vortex - Test installer"           │      │  "Vortex - Test CLI"                 │
│  artifact: vortex-installer          │      │  artifact: vortex-cli                │
└─────────────────────────────────────┘      └─────────────────────────────────────┘

@github-project-automation github-project-automation Bot moved this to BACKLOG in Vortex 1.x Jul 29, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 2.0 milestone Jul 29, 2026
@AlexSkrypnyk AlexSkrypnyk added the A3 Board worker 3 label Jul 29, 2026
@github-project-automation github-project-automation Bot moved this to BACKLOG in Vortex 2.x Jul 29, 2026
@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.11%. Comparing base (c7f7b0e) to head (4b5f25b).

Files with missing lines Patch % Lines
.vortex/cli/src/Command/InstallCommand.php 91.66% 1 Missing ⚠️
...ortex/cli/src/Prompts/Handlers/AbstractHandler.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              2.x    #2856      +/-   ##
==========================================
+ Coverage   88.08%   88.11%   +0.02%     
==========================================
  Files          98       98              
  Lines        5379     5392      +13     
  Branches        3        3              
==========================================
+ Hits         4738     4751      +13     
  Misses        641      641              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (153/153)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (153/153)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Jul 29, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit 5198aed into 2.x Jul 29, 2026
36 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/2841-installer-to-cli branch July 29, 2026 02:59
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Jul 29, 2026
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 2.x Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3 Board worker 3 Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue
Status: Release queue

Development

Successfully merging this pull request may close these issues.

1 participant