-
-
Notifications
You must be signed in to change notification settings - Fork 28
Renamed VORTEX_INSTALL_ to VORTEX_INSTALLER_ variables.
#1845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
""" WalkthroughThis change systematically renames all relevant environment variables and constants from the prefix Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ShellScript
participant Installer(PHP)
participant Tests
User->>ShellScript: Set VORTEX_INSTALLER_* env vars
ShellScript->>Installer(PHP): Passes VORTEX_INSTALLER_* vars
Installer(PHP)->>Installer(PHP): Reads VORTEX_INSTALLER_* vars for config
User->>Tests: Run tests with VORTEX_INSTALLER_* vars
Tests->>Installer(PHP): Passes VORTEX_INSTALLER_* vars during test runs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 phpcs (3.7.2).vortex/installer/src/Command/InstallCommand.phpERROR: Referenced sniff "Drupal" does not exist Run "phpcs --help" for usage information .vortex/installer/src/Prompts/PromptManager.phpERROR: Referenced sniff "Drupal" does not exist Run "phpcs --help" for usage information .vortex/installer/src/Utils/Config.phpERROR: Referenced sniff "Drupal" does not exist Run "phpcs --help" for usage information
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (17)
.vortex/docs/content/contributing/maintenance/tests.mdx(2 hunks).vortex/docs/content/workflows/variables.mdx(1 hunks).vortex/installer/src/Command/InstallCommand.php(1 hunks).vortex/installer/src/Prompts/PromptManager.php(1 hunks).vortex/installer/src/Utils/Config.php(1 hunks).vortex/installer/tests/Functional/PharTest.php(1 hunks).vortex/tests/bats/_helper.bash(4 hunks).vortex/tests/bats/_helper.workflow.bash(2 hunks).vortex/tests/bats/e2e/deployment1.bats(3 hunks).vortex/tests/bats/e2e/update-vortex.bats(1 hunks).vortex/tests/bats/e2e/workflow.install.profile.bats(1 hunks).vortex/tests/bats/e2e/workflow.storage.image.bats(2 hunks).vortex/tests/bats/e2e/workflow.storage.image_cached.bats(2 hunks).vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php(1 hunks).vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php(1 hunks).vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php(2 hunks)scripts/vortex/update-vortex.sh(2 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in `.vortex/installer/tests/Fixtures/install` directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/workflow.storage.image.bats (3)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.
.vortex/installer/tests/Functional/PharTest.php (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/workflow.storage.image_cached.bats (3)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.
.vortex/tests/bats/e2e/deployment1.bats (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/update-vortex.bats (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/workflow.install.profile.bats (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/_helper.workflow.bash (1)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/docs/content/contributing/maintenance/tests.mdx (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/installer/src/Command/InstallCommand.php (1)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
.vortex/tests/bats/_helper.bash (3)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.
.vortex/installer/src/Utils/Config.php (2)
Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/src/Prompts/Handlers/Internal.php:52-52
Timestamp: 2025-06-01T08:10:15.903Z
Learning: The File utility class in .vortex/installer/src/Utils/File.php extends AlexSkrypnyk\File\File, and methods like collapseRepeatedEmptyLines() are available from this external parent class dependency.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
🪛 GitHub Actions: Vortex - Test installer
.vortex/installer/src/Command/InstallCommand.php
[warning] 198-198: Line exceeds 80 characters; contains 81 characters (Drupal.Files.LineLength.TooLong)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: build (0)
- GitHub Check: build (1)
- GitHub Check: vortex-test-deployment (1)
- GitHub Check: vortex-test-workflow (3)
- GitHub Check: vortex-test-workflow (2)
- GitHub Check: vortex-test-deployment (0)
- GitHub Check: vortex-test-workflow (0)
- GitHub Check: vortex-test-workflow (1)
- GitHub Check: vortex-test-common
- GitHub Check: vortex-test-docs
🔇 Additional comments (25)
.vortex/installer/tests/Functional/PharTest.php (1)
129-129: LGTM! Environment variable rename is consistent.The update from
VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIPtoVORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIPcorrectly aligns with the systematic variable renaming across the codebase..vortex/tests/bats/e2e/workflow.install.profile.bats (2)
13-13: LGTM! Environment variable export updated correctly.The environment variable name has been properly updated to use the
VORTEX_INSTALLER_prefix, maintaining consistency with the broader renaming effort.
17-17: LGTM! Comment updated to match the new variable name.The comment correctly reflects the updated environment variable name, ensuring documentation stays in sync with the code changes.
.vortex/tests/bats/e2e/deployment1.bats (3)
24-24: LGTM! Prompt variable updated correctly for Acquia deployment test.The environment variable has been properly renamed from
VORTEX_INSTALL_PROMPT_DEPLOY_TYPEStoVORTEX_INSTALLER_PROMPT_DEPLOY_TYPES, maintaining consistency with the updated prefix convention.
121-125: LGTM! All Lagoon deployment prompt variables updated consistently.All environment variables in this test section have been correctly updated to use the
VORTEX_INSTALLER_PROMPT_prefix:
DEPLOY_TYPESHOSTING_PROVIDERDATABASE_DOWNLOAD_SOURCEThe systematic renaming maintains test functionality while aligning with the new naming convention.
209-213: LGTM! Profile-driven Lagoon deployment variables updated correctly.All prompt variables for the profile-driven deployment test have been systematically updated to use the
VORTEX_INSTALLER_PROMPT_prefix, including the additionalPROVISION_TYPEvariable. The changes maintain test consistency..vortex/tests/bats/e2e/workflow.storage.image_cached.bats (2)
31-31: LGTM! Demo database skip variable updated correctly.The environment variable has been properly renamed from
VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIPtoVORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, aligning with the systematic prefix update.
47-47: LGTM! Comment updated to match the new variable name.The comment correctly references the updated environment variable name, ensuring documentation consistency with the code changes.
.vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php (1)
94-94: LGTM! Consistent variable renaming.The constant reference has been correctly updated to use the new
VORTEX_INSTALLER_prefix, maintaining the same functionality while aligning with the systematic renaming effort..vortex/tests/bats/e2e/update-vortex.bats (1)
48-48: LGTM! Environment variable renaming is consistent.The environment variable has been correctly renamed to use the
VORTEX_INSTALLER_prefix, maintaining the same test functionality while following the new naming convention..vortex/tests/bats/e2e/workflow.storage.image.bats (1)
29-29: LGTM! Consistent variable renaming in both export and comment.The environment variable has been correctly renamed to use the
VORTEX_INSTALLER_prefix in both the export statement and the explanatory comment, maintaining consistency throughout the test.Also applies to: 45-45
.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1)
20-20: LGTM! Comprehensive constant renaming with consistent references.The constant has been correctly renamed to use the
VORTEX_INSTALLER_prefix, and all references to it within the trait have been consistently updated. The functionality and URL value remain unchanged.Also applies to: 28-28, 30-30
scripts/vortex/update-vortex.sh (1)
29-29: LGTM! Consistent environment variable renaming.The environment variable has been correctly renamed to use the
VORTEX_INSTALLER_prefix in both its initialization and usage, maintaining the same script functionality while following the new naming convention.Also applies to: 73-73
.vortex/tests/bats/_helper.workflow.bash (2)
59-59: LGTM! Environment variable renamed consistently.This change aligns with the systematic renaming effort from
VORTEX_INSTALL_toVORTEX_INSTALLER_prefix.
86-86: LGTM! Consistent variable renaming.This change matches the renaming pattern and maintains the same functionality as the previous occurrence on line 59.
.vortex/docs/content/contributing/maintenance/tests.mdx (2)
125-125: LGTM! Documentation updated to reflect variable renaming.The shell command documentation correctly uses the new
VORTEX_INSTALLER_TEMPLATE_REPOvariable name.
163-163: LGTM! Consistent documentation update.This change matches the variable renaming pattern and ensures documentation accuracy across all test database update procedures.
.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (3)
53-53: LGTM! Template repository variable renamed consistently.The variable name change maintains the same functionality while following the new naming convention.
65-65: LGTM! Demo database test variable renamed consistently.This change aligns with the renaming pattern seen in other test files and maintains the same functionality.
68-68: LGTM! Temporary directory variable renamed consistently.The variable rename follows the established pattern and maintains the same functionality for installer temporary directory management.
.vortex/installer/src/Prompts/PromptManager.php (1)
388-388: LGTM! Prompt environment variable prefix updated systematically.This change ensures all dynamically generated prompt environment variables follow the new
VORTEX_INSTALLER_PROMPT_naming convention consistently..vortex/docs/content/workflows/variables.mdx (1)
1150-1159: LGTM! Comprehensive documentation for the new variable.The documentation clearly explains the
VORTEX_INSTALLER_TEMPLATE_REPOvariable with excellent examples covering various URI formats and reference types. This will be very helpful for users..vortex/tests/bats/_helper.bash (3)
139-147: Renamed demo-DB variable looks goodThe move to
VORTEX_INSTALLER_DEMO_DB_TESTkeeps naming consistent with the new prefix and the value remains unchanged.
No further action required.
1087-1095: Consistent TMP/REPO renames – implementation is correct
VORTEX_INSTALLER_TEMPLATE_REPOandVORTEX_INSTALLER_TMP_DIRare set and exported exactly once, preserving previous behaviour.
Directory creation is still guarded byfixture_prepare_dir, so no functional regression.
1102-1105: Reference update propagated correctlyThe curl DB override now targets the new variable – good catch.
| const ROOT = 'VORTEX_INSTALLER_ROOT_DIR'; | ||
|
|
||
| const DST = 'VORTEX_INSTALL_DST_DIR'; | ||
| const DST = 'VORTEX_INSTALLER_DST_DIR'; | ||
|
|
||
| const TMP = 'VORTEX_INSTALL_TMP_DIR'; | ||
| const TMP = 'VORTEX_INSTALLER_TMP_DIR'; | ||
|
|
||
| const REPO = 'VORTEX_INSTALL_TEMPLATE_REPO'; | ||
| const REPO = 'VORTEX_INSTALLER_TEMPLATE_REPO'; | ||
|
|
||
| const REF = 'VORTEX_INSTALL_TEMPLATE_REF'; | ||
| const REF = 'VORTEX_INSTALLER_TEMPLATE_REF'; | ||
|
|
||
| const PROCEED = 'VORTEX_INSTALL_PROCEED'; | ||
| const PROCEED = 'VORTEX_INSTALLER_PROCEED'; | ||
|
|
||
| const IS_DEMO = 'VORTEX_INSTALL_IS_DEMO'; | ||
| const IS_DEMO = 'VORTEX_INSTALLER_IS_DEMO'; | ||
|
|
||
| const IS_DEMO_DB_DOWNLOAD_SKIP = 'VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIP'; | ||
| const IS_DEMO_DB_DOWNLOAD_SKIP = 'VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP'; | ||
|
|
||
| const IS_VORTEX_PROJECT = 'VORTEX_INSTALL_IS_VORTEX_PROJECT'; | ||
| const IS_VORTEX_PROJECT = 'VORTEX_INSTALLER_IS_VORTEX_PROJECT'; | ||
|
|
||
| const VERSION = 'VORTEX_INSTALL_VERSION'; | ||
| const VERSION = 'VORTEX_INSTALLER_VERSION'; | ||
|
|
||
| const NO_INTERACTION = 'VORTEX_INSTALL_NO_INTERACTION'; | ||
| const NO_INTERACTION = 'VORTEX_INSTALLER_NO_INTERACTION'; | ||
|
|
||
| const QUIET = 'VORTEX_INSTALL_QUIET'; | ||
| const QUIET = 'VORTEX_INSTALLER_QUIET'; | ||
|
|
||
| const NO_CLEANUP = 'VORTEX_INSTALL_NO_CLEANUP'; | ||
| const NO_CLEANUP = 'VORTEX_INSTALLER_NO_CLEANUP'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Constant renames are accurate but consider a deprecation bridge
All installer-related constants have been renamed to the new _INSTALLER_ prefix, which is fine for a major version bump.
For smoother upgrades you might provide temporary fall-backs:
// After the constant block
private const LEGACY_MAP = [
'VORTEX_INSTALL_ROOT_DIR' => self::ROOT,
'VORTEX_INSTALL_DST_DIR' => self::DST,
// …
];
public function get(string $name, mixed $default = null): mixed {
// Accept legacy names transparently.
if (isset(self::LEGACY_MAP[$name])) {
$name = self::LEGACY_MAP[$name];
}
return $this->store[$name] ?? $default;
}This keeps BC for external scripts that haven’t migrated yet while allowing you to schedule removal later.
🤖 Prompt for AI Agents
In .vortex/installer/src/Utils/Config.php around lines 16 to 40, the constants
have been renamed with a new _INSTALLER_ prefix, but to maintain backward
compatibility, add a private LEGACY_MAP array mapping old constant names to the
new ones. Then, update the get method to check if the requested name is in
LEGACY_MAP and translate it to the new constant before accessing the store. This
will allow external scripts using old constant names to continue working while
you plan for eventual removal of legacy support.
| ([ "${1:-}" = "--quiet" ] || [ "${1:-}" = "-q" ]) && shift | ||
| # Destination directory, that can be overridden with the first argument to this script. | ||
| VORTEX_INSTALL_DST_DIR="${VORTEX_INSTALL_DST_DIR:-$(pwd)}" | ||
| VORTEX_INSTALL_DST_DIR=${1:-${VORTEX_INSTALL_DST_DIR}} | ||
| VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}" | ||
| VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}} | ||
|
|
||
| pushd "${VORTEX_INSTALL_DST_DIR}" >/dev/null || exit 1 | ||
| pushd "${VORTEX_INSTALLER_DST_DIR}" >/dev/null || exit 1 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Export the rewritten destination variable for downstream consumers
fix_host_dependencies() rewrites VORTEX_INSTALLER_DST_DIR but never re-exports it.
If any sub-process spawned later expects the variable in its environment, it will receive the old value (or nothing). Exporting keeps behaviour identical to the earlier implementation that relied on a pre-exported variable.
- VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}"
- VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}}
+ VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}"
+ VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}}
+ export VORTEX_INSTALLER_DST_DIR🤖 Prompt for AI Agents
In .vortex/tests/bats/_helper.bash around lines 1354 to 1360, after rewriting
the VORTEX_INSTALLER_DST_DIR variable, add an export statement for it. This
ensures that any subprocesses spawned later receive the updated value in their
environment, maintaining consistent behavior with the previous implementation
that relied on the variable being pre-exported.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1845 +/- ##
========================================
Coverage 75.05% 75.05%
========================================
Files 84 84
Lines 4835 4835
Branches 35 35
========================================
Hits 3629 3629
Misses 1206 1206 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3e1d739 to
e042644
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1)
15-21: Minor docblock wording & version driftThe comment still says “set the CURL DB to test DB” – leftover wording that predates the refactor.
Also, the hard-coded URL pins to release25.4.0; ensure this stays in sync with the fixture tag to avoid silent test breakage.No functional issues; consider a quick wording touch-up or moving the URL to a central config to ease future updates.
♻️ Duplicate comments (3)
.vortex/installer/src/Command/InstallCommand.php (1)
198-199: Line length violation needs to be addressed.The environment variable prefix update is correct, but the line exceeds the 80-character limit as flagged by the pipeline.
.vortex/tests/bats/_helper.bash (1)
1354-1359:VORTEX_INSTALLER_DST_DIRstill isn’t exported – child processes won’t see itSame point raised earlier: after rewriting the destination directory the variable is not
re-exported, so any command the helper spawns won’t receive the updated value in its
environment.VORTEX_INSTALLER_DST_DIR="${VORTEX_INSTALLER_DST_DIR:-$(pwd)}" VORTEX_INSTALLER_DST_DIR=${1:-${VORTEX_INSTALLER_DST_DIR}} + export VORTEX_INSTALLER_DST_DIR.vortex/installer/src/Utils/Config.php (1)
16-41: Provide a BC bridge for legacyVORTEX_INSTALL_*env-varsRenaming the constants is fine, but external automation that still sets the old
VORTEX_INSTALL_*variables will now be ignored. A minimal compatibility layer keeps
things working until users migrate:+ /** @internal temporary BC map – remove in next major */ + private const LEGACY_MAP = [ + 'VORTEX_INSTALL_ROOT_DIR' => self::ROOT, + 'VORTEX_INSTALL_DST_DIR' => self::DST, + 'VORTEX_INSTALL_TMP_DIR' => self::TMP, + 'VORTEX_INSTALL_TEMPLATE_REPO' => self::REPO, + 'VORTEX_INSTALL_TEMPLATE_REF' => self::REF, + 'VORTEX_INSTALL_PROCEED' => self::PROCEED, + // …extend for the rest… + ];and in
get():public function get(string $name, mixed $default = null): mixed { if (isset(self::LEGACY_MAP[$name])) { $name = self::LEGACY_MAP[$name]; } return $this->store[$name] ?? $default; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (17)
.vortex/docs/content/contributing/maintenance/tests.mdx(2 hunks).vortex/docs/content/workflows/variables.mdx(1 hunks).vortex/installer/src/Command/InstallCommand.php(1 hunks).vortex/installer/src/Prompts/PromptManager.php(1 hunks).vortex/installer/src/Utils/Config.php(1 hunks).vortex/installer/tests/Functional/PharTest.php(1 hunks).vortex/tests/bats/_helper.bash(4 hunks).vortex/tests/bats/_helper.workflow.bash(2 hunks).vortex/tests/bats/e2e/deployment1.bats(3 hunks).vortex/tests/bats/e2e/update-vortex.bats(1 hunks).vortex/tests/bats/e2e/workflow.install.profile.bats(1 hunks).vortex/tests/bats/e2e/workflow.storage.image.bats(2 hunks).vortex/tests/bats/e2e/workflow.storage.image_cached.bats(2 hunks).vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php(1 hunks).vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php(1 hunks).vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php(2 hunks)scripts/vortex/update-vortex.sh(2 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in `.vortex/installer/tests/Fixtures/install` directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/installer/src/Command/InstallCommand.php (1)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
.vortex/tests/bats/e2e/workflow.storage.image_cached.bats (3)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.
.vortex/tests/bats/e2e/workflow.storage.image.bats (3)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.
.vortex/installer/tests/Functional/PharTest.php (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/update-vortex.bats (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/e2e/workflow.install.profile.bats (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/docs/content/contributing/maintenance/tests.mdx (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/docs/content/workflows/variables.mdx (1)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
.vortex/tests/bats/e2e/deployment1.bats (2)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
.vortex/tests/bats/_helper.bash (3)
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
Learnt from: AlexSkrypnyk
PR: #1816
File: .docker/cli.dockerfile:72-76
Timestamp: 2025-07-23T01:16:30.963Z
Learning: In the Vortex project, unauthenticated Composer installs should be allowed, so GitHub token secrets should not be marked as required=true in Docker build mounts. The conditional check if [ -s /run/secrets/github_token ] is the preferred approach to allow builds to proceed without a token when needed.
.vortex/installer/src/Utils/Config.php (3)
Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/src/Prompts/Handlers/Internal.php:52-52
Timestamp: 2025-06-01T08:10:15.903Z
Learning: The File utility class in .vortex/installer/src/Utils/File.php extends AlexSkrypnyk\File\File, and methods like collapseRepeatedEmptyLines() are available from this external parent class dependency.
Learnt from: AlexSkrypnyk
PR: drevops/vortex#0
File: :0-0
Timestamp: 2025-05-29T12:15:32.188Z
Learning: Do not review files in .vortex/installer/tests/Fixtures/install directory as they are test fixtures.
Learnt from: AlexSkrypnyk
PR: #1697
File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17
Timestamp: 2025-06-02T00:41:36.321Z
Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: build (0)
- GitHub Check: build (1)
- GitHub Check: vortex-test-installer (8.2)
- GitHub Check: vortex-test-installer (8.3)
- GitHub Check: vortex-test-installer (8.4)
- GitHub Check: vortex-test-workflow (1)
- GitHub Check: vortex-test-deployment (0)
- GitHub Check: vortex-test-deployment (1)
- GitHub Check: vortex-test-workflow (3)
- GitHub Check: vortex-test-workflow (0)
- GitHub Check: vortex-test-workflow (2)
- GitHub Check: vortex-test-common
- GitHub Check: vortex-test-docs
🔇 Additional comments (21)
.vortex/tests/bats/e2e/workflow.install.profile.bats (2)
13-13: LGTM! Environment variable name updated correctly.The variable name change from
VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIPtoVORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIPaligns with the PR objectives.
17-17: LGTM! Comment updated to match the new variable name.The comment correctly references the updated environment variable name.
.vortex/installer/tests/Functional/PharTest.php (1)
129-129: LGTM! Environment variable name updated correctly.The environment variable key has been properly updated from
VORTEX_INSTALL_IS_DEMO_DB_DOWNLOAD_SKIPtoVORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, maintaining consistency with the PR objectives..vortex/tests/bats/e2e/workflow.storage.image_cached.bats (2)
31-31: LGTM! Environment variable name updated correctly.The export statement properly uses the updated variable name
VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, consistent with the renaming effort.
47-47: LGTM! Comment updated to reflect the new variable name.The comment correctly references the updated environment variable name in the assertion explanation.
.vortex/tests/bats/e2e/workflow.storage.image.bats (2)
29-29: LGTM! Environment variable name updated correctly.The export statement has been properly updated to use
VORTEX_INSTALLER_IS_DEMO_DB_DOWNLOAD_SKIP, maintaining consistency with the renaming effort.
45-45: LGTM! Comment updated to match the new variable name.The comment correctly references the updated environment variable name in the assertion explanation.
.vortex/tests/bats/e2e/update-vortex.bats (1)
48-49: Variable rename looks goodExport now uses
VORTEX_INSTALLER_TEMPLATE_REF, matching the new convention. No additional occurrences of the old name are present in this script..vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php (1)
28-31: Consistent renaming appliedAll internal references now use
VORTEX_INSTALLER_DEMO_DB_TEST, matching the new constant. Good catch.scripts/vortex/update-vortex.sh (1)
29-29: No backward-compatibility break detected
A repository-wide search forVORTEX_INSTALL_TEMPLATE_REPOreturned no occurrences, so there’s no existing usage of the old name to preserve. The newVORTEX_INSTALLER_TEMPLATE_REPOcan safely be the sole environment variable..vortex/tests/bats/_helper.workflow.bash (2)
59-59: Variable rename aligns with PR objectives.The renaming of
VORTEX_INSTALL_DEMO_DB_TESTtoVORTEX_INSTALLER_DEMO_DB_TESTis consistent with the systematic variable prefix update described in the PR objectives.
86-86: Consistent variable rename implementation.The variable renaming here matches the change in the
assert_ahoy_download_dbfunction, ensuring consistent usage of the newVORTEX_INSTALLER_prefix throughout the test helpers..vortex/docs/content/contributing/maintenance/tests.mdx (2)
125-125: Documentation updated to reflect variable renaming.The environment variable name has been correctly updated in the documentation to match the new
VORTEX_INSTALLER_prefix used throughout the codebase.
163-163: Consistent documentation update.This second occurrence of the variable rename ensures the documentation remains consistent throughout the file.
.vortex/installer/src/Prompts/PromptManager.php (1)
388-388: Environment variable prefix updated systematically.The change from
'VORTEX_INSTALL_PROMPT_'to'VORTEX_INSTALLER_PROMPT_'ensures that all prompt-related environment variables follow the new naming convention established by this PR..vortex/tests/phpunit/Traits/Steps/StepPrepareSutTrait.php (3)
53-53: Template repository variable renamed consistently.The
VORTEX_INSTALL_TEMPLATE_REPOtoVORTEX_INSTALLER_TEMPLATE_REPOrename maintains functionality while aligning with the new variable naming convention.
65-65: Demo database variable prefix updated.The variable name change preserves the same functionality for specifying the demo database URL in tests.
68-68: Temporary directory variable renamed systematically.The
VORTEX_INSTALL_TMP_DIRtoVORTEX_INSTALLER_TMP_DIRchange completes the consistent renaming of installer-related environment variables in this method..vortex/docs/content/workflows/variables.mdx (1)
1150-1159: Documentation reorganized to consolidate variable information.The
VORTEX_INSTALLER_TEMPLATE_REPOvariable documentation has been moved to consolidate duplicate content, improving the overall structure and readability of the variables documentation..vortex/tests/bats/_helper.bash (2)
140-146: No stale references to the legacy demo‐DB variable foundI ran the following search across the repository:
rg -n "VORTEX_INSTALL_DEMO_DB_TEST"and found no occurrences of the old
VORTEX_INSTALL_DEMO_DB_TESTname. The rename toVORTEX_INSTALLER_DEMO_DB_TESTis therefore safe.
1087-1095: Quote the generated TMP path to handle spaces
fixture_prepare_dir "${VORTEX_INSTALLER_TMP_DIR}"already quotes the variable, but the
assignment lines above don’t. If${APP_TMP_DIR}accidentally contains spaces the
unquoted expansion during assignment or export can mis-split. A tiny defensive tweak:- VORTEX_INSTALLER_TMP_DIR="${APP_TMP_DIR}/$(random_string)" - fixture_prepare_dir "${VORTEX_INSTALLER_TMP_DIR}" - export VORTEX_INSTALLER_TMP_DIR + VORTEX_INSTALLER_TMP_DIR="${APP_TMP_DIR}/$(random_string)" + fixture_prepare_dir "${VORTEX_INSTALLER_TMP_DIR}" + export VORTEX_INSTALLER_TMP_DIR⛔ Skipped due to learnings
Learnt from: AlexSkrypnyk PR: drevops/vortex#0 File: :0-0 Timestamp: 2025-05-29T12:15:32.188Z Learning: Do not review files in `.vortex/installer/tests/Fixtures/install` directory as they are test fixtures.Learnt from: AlexSkrypnyk PR: drevops/vortex#1697 File: .vortex/installer/tests/Fixtures/install/provision_database_lagoon/docs/onboarding.md:16-17 Timestamp: 2025-06-02T00:41:36.321Z Learning: DO NOT EVER REVIEW FILES IN .vortex/installer/tests/Fixtures/ directory - these are test fixtures and should not be reviewed under any circumstances.
| export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="artifact" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Duplicate export lines – keep only one to avoid confusion
VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES is exported twice (lines 24 and 121/123), and the group of prompt variables is repeated at 121-125 and again at 209-214. While harmless, this increases maintenance overhead.
- export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="artifact"
…
- export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="lagoon"
- export VORTEX_INSTALLER_PROMPT_HOSTING_PROVIDER="lagoon"
- export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="lagoon"
+ # Set once – later repetitions removed.
+ export VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES="lagoon"
+ export VORTEX_INSTALLER_PROMPT_HOSTING_PROVIDER="lagoon"Removing the duplicates keeps the test setup clearer and prevents accidental divergence if one value is updated and the other is missed.
Also applies to: 121-125
🤖 Prompt for AI Agents
In .vortex/tests/bats/e2e/deployment1.bats around lines 24-25 and also 121-125
and 209-214, there are duplicate export statements for
VORTEX_INSTALLER_PROMPT_DEPLOY_TYPES and repeated groups of prompt variables. To
fix this, remove the duplicate export lines and repeated prompt variable groups,
keeping only one instance of each to reduce maintenance overhead and avoid
confusion or divergence in values.
| // Ahoy will load environment variable, and it will take precedence over | ||
| // the value in .env file. | ||
| 'VORTEX_DB_DOWNLOAD_URL' => static::VORTEX_INSTALL_DEMO_DB_TEST, | ||
| 'VORTEX_DB_DOWNLOAD_URL' => static::VORTEX_INSTALLER_DEMO_DB_TEST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Potential undefined constant reference
getDefaultBuildEnv() relies on static::VORTEX_INSTALLER_DEMO_DB_TEST, but this trait itself does not define the constant and only uses LoggerTrait.
Runtime is safe as long as every test class that uses StepBuildTrait also pulls in a trait (e.g. StepDownloadDbTrait) or class that does declare the constant, but the coupling is implicit and fragile.
Consider either
• declaring the constant here (duplicating value once), or
• adding require-style documentation / type hinting, or
• moving shared constants to a dedicated trait or Config class that both traits include.
This will prevent fatal errors if StepBuildTrait is ever re-used in isolation.
🏁 Script executed:
#!/bin/bash
# Search for all occurrences of the constant
rg -n "VORTEX_INSTALLER_DEMO_DB_TEST"
# Locate the trait definitions to inspect whether they declare the constant
rg -n "trait StepBuildTrait" -R
rg -n "trait StepDownloadDbTrait" -R
# Check if any file defines the constant explicitly
rg -n "const VORTEX_INSTALLER_DEMO_DB_TEST" -RLength of output: 1374
🏁 Script executed:
#!/bin/bash
# Locate and display the beginning of StepBuildTrait.php to check for constant definitions
file1=$(find . -type f -name StepBuildTrait.php | head -n1)
echo "=== $file1 ==="
sed -n '1,200p' "$file1"
# Locate and display the beginning of StepDownloadDbTrait.php to see if it declares the constant
file2=$(find . -type f -name StepDownloadDbTrait.php | head -n1)
echo "=== $file2 ==="
sed -n '1,200p' "$file2"Length of output: 6011
Ensure VORTEX_INSTALLER_DEMO_DB_TEST is explicitly defined or centralized
The getDefaultBuildEnv() method in StepBuildTrait references
static::VORTEX_INSTALLER_DEMO_DB_TESTbut that constant is only declared in StepDownloadDbTrait. This implicit coupling can lead to fatal errors if StepBuildTrait is ever used in isolation.
Files to review:
.vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php–getDefaultBuildEnv()uses the constant.vortex/tests/phpunit/Traits/Steps/StepDownloadDbTrait.php– definesconst VORTEX_INSTALLER_DEMO_DB_TEST
Possible solutions:
- Declare
const VORTEX_INSTALLER_DEMO_DB_TESTdirectly inStepBuildTrait - Move shared constants into a new
Configclass or a dedicated trait that both can include - Add a docblock or
@requiresannotation onStepBuildTraitto document its dependency on the constant
🤖 Prompt for AI Agents
In .vortex/tests/phpunit/Traits/Steps/StepBuildTrait.php at line 94, the method
getDefaultBuildEnv() uses the constant VORTEX_INSTALLER_DEMO_DB_TEST which is
only defined in StepDownloadDbTrait, causing a hidden dependency. To fix this,
either define the constant directly in StepBuildTrait, or create a shared Config
class or trait containing this constant and have both traits use it.
Alternatively, add a docblock or @requires annotation in StepBuildTrait to
document the dependency explicitly.
Summary by CodeRabbit
Documentation
VORTEX_INSTALLER_.Refactor
VORTEX_INSTALL_toVORTEX_INSTALLER_for consistency across scripts, tests, and configuration.Tests