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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 26 additions & 18 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ commands:
usage: Show container logs for services.
cmd: docker compose logs "$@"

# Drop into a shell if no arguments are supplied, otherwise run the command.
# Environment variables are passed from the host and filtered by prefix.
# Use \" (slash followed by a double quote) to escape double quotes in
# arguments that contain spaces.
Comment on lines +83 to +86

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 doc typo: it’s a backslash, not a slash

“Use " (slash followed by a double quote)” → “Use " (backslash followed by a double quote)”.

-  # Use \" (slash followed by a double quote) to escape double quotes in
+  # Use \" (backslash followed by a double quote) to escape double quotes in
📝 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
# Drop into a shell if no arguments are supplied, otherwise run the command.
# Environment variables are passed from the host and filtered by prefix.
# Use \" (slash followed by a double quote) to escape double quotes in
# arguments that contain spaces.
# Drop into a shell if no arguments are supplied, otherwise run the command.
# Environment variables are passed from the host and filtered by prefix.
# Use \" (backslash followed by a double quote) to escape double quotes in
# arguments that contain spaces.
🤖 Prompt for AI Agents
In .ahoy.yml around lines 83 to 86, the docs mistakenly describe \" as "slash
followed by a double quote"; update the text to say "backslash followed by a
double quote" (i.e., replace the word "slash" with "backslash") so the escape
instruction is correct.

cli:
usage: Start a shell or run a command inside the CLI service container.
# Drop into a shell if no arguments are supplied, otherwise run the command.
# Environment variables are passed from the host and filtered by prefix.
# Use \" (slash followed by a double quote) to escape double quotes in
# arguments that contain spaces.
cmd: |
if [ "${#}" -ne 0 ]; then
docker compose exec $(env | cut -f1 -d= | grep "TERM\|COMPOSE_\|GITHUB_\|PACKAGE_\|DOCKER_\|DRUPAL_\|VORTEX_" | sed 's/^/-e /') cli bash -c "$*"
Expand Down Expand Up @@ -122,7 +122,7 @@ commands:
#;< !PROVISION_TYPE_PROFILE
download-db:
usage: Download database. Run with "--no-cache" option to force fresh database backup.
aliases: ['fetch-db']
aliases: [fetch-db]
cmd: |
case " $* " in *" --no-cache "*) export VORTEX_DB_DOWNLOAD_NO_CACHE=1;; esac
./scripts/vortex/download-db.sh
Expand Down Expand Up @@ -158,7 +158,7 @@ commands:
cmd: \[ -n "${VORTEX_DB_IMAGE}" \] && docker pull ${VORTEX_DB_IMAGE} || true

reset:
usage: "Remove containers, all build files. Use with `hard` to reset repository to the last commit."
usage: Remove containers, all build files. Use with `hard` to reset repository to the last commit.
cmd: |
ahoy confirm "All containers and build files will be removed. Proceed?" || exit 0
AHOY_CONFIRM_RESPONSE=y ahoy down
Expand Down Expand Up @@ -190,7 +190,10 @@ commands:

lint:
usage: Lint back-end and front-end code.
cmd: ahoy lint-be && ahoy lint-fe && ahoy lint-tests
cmd: |
ahoy lint-be
ahoy lint-fe
ahoy lint-tests

lint-be:
usage: Lint back-end code.
Expand All @@ -211,11 +214,14 @@ commands:

lint-tests:
usage: Lint tests code.
cmd: ahoy cli vendor/bin/gherkinlint lint tests/behat/features
cmd: |
ahoy cli vendor/bin/gherkinlint lint tests/behat/features

lint-fix:
usage: Fix lint issues of back-end and front-end code.
cmd: ahoy lint-be-fix && ahoy lint-fe-fix
cmd: |
ahoy lint-be-fix
ahoy lint-fe-fix

lint-be-fix:
usage: Fix lint issues of back-end code.
Expand All @@ -234,7 +240,11 @@ commands:

test:
usage: Run all tests.
cmd: ahoy test-unit && ahoy test-kernel && ahoy test-functional && ahoy test-bdd
cmd: |
ahoy test-unit
ahoy test-kernel
ahoy test-functional
ahoy test-bdd

test-unit:
usage: Run PHPUnit unit tests.
Expand All @@ -250,7 +260,7 @@ commands:

test-bdd:
usage: Run BDD tests.
aliases: ['test-behat']
aliases: [test-behat]
cmd: ahoy cli php -d memory_limit=-1 vendor/bin/behat --colors "$@"

debug:
Expand All @@ -274,8 +284,7 @@ commands:
local:
usage: Custom local commands. See `ahoy local help`.
optional: true
imports:
- .ahoy.local.yml
imports: [.ahoy.local.yml]

# ----------------------------------------------------------------------------
# Utilities.
Expand Down Expand Up @@ -307,15 +316,14 @@ commands:
hide: true

# Override entrypoint to alter default behavior of Ahoy.
# 1. Exit the script if any statement returns a non-true return value.
# 2. Read variables from .env file (while respecting existing values) to load
# and pass updated environment variables' values into already running
# containers.
Comment on lines +319 to +322

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)

Entry-point comment removal is OK; make sure behavior remains documented

You moved the explanatory comment up near cli, which is fine. Ensure contributors still discover the “load .env into running containers” behavior easily (README mention helps).

🤖 Prompt for AI Agents
In .ahoy.yml around lines 319-322 the explanatory comment about exiting on
errors and loading .env into running containers was moved; ensure the behavior
remains discoverable by adding a short inline note near the cli entry (or
reinstating a one-line comment here) that references the README, and update the
README (or CONTRIBUTING) with a clear section describing the “read variables
from .env and pass updated values into already running containers” behavior and
the rationale so contributors can find it easily.

entrypoint:
- bash
- -c
# Exit the script if any statement returns a non-true return value.
- -e
# Read variables from .env file, respecting existing values.
# - Used to load and pass updated environment variables' values into already
# running containers.
# - Use `ahoy up cli` in cases when changes require container restart.
- |
t=$(mktemp) && export -p > "$t" && set -a && . ./.env && if [ -f ./.env.local ];then . ./.env.local;fi && set +a && . "$t" && rm "$t" && unset t
bash -e -c "$0" "$@"
Expand Down
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,41 +286,51 @@ jobs:
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli composer normalize --dry-run || [ "${VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE:-0}" -eq 1 ]

#;< TOOL_PHPCS
- run:
name: Lint code with PHPCS
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli vendor/bin/phpcs || [ "${VORTEX_CI_PHPCS_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_PHPCS

#;< TOOL_PHPSTAN
- run:
name: Lint code with PHPStan
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli vendor/bin/phpstan || [ "${VORTEX_CI_PHPSTAN_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_PHPSTAN

#;< TOOL_RECTOR
- run:
name: Lint code with Rector
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli vendor/bin/rector --clear-cache --dry-run || [ "${VORTEX_CI_RECTOR_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_RECTOR

#;< TOOL_PHPMD
- run:
name: Lint code with PHPMD
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli vendor/bin/phpmd . text phpmd.xml || [ "${VORTEX_CI_PHPMD_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_PHPMD

- run:
name: Lint code with Twig CS Fixer
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli vendor/bin/twig-cs-fixer || [ "${VORTEX_CI_TWIG_CS_FIXER_IGNORE_FAILURE:-0}" -eq 1 ]

#;< TOOL_BEHAT
- run:
name: Lint code with Gherkin Lint
command: |
[ "${CIRCLE_NODE_TOTAL:-1}" -gt 1 ] && [ "${CIRCLE_NODE_INDEX:-0}" -ne 0 ] && exit 0
docker compose exec -T cli vendor/bin/gherkinlint lint tests/behat/features || [ "${VORTEX_CI_GHERKIN_LINT_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_BEHAT

- run:
name: Lint module code with NodeJS linters
Expand All @@ -346,10 +356,13 @@ jobs:
docker compose exec $(env | cut -f1 -d= | sed 's/^/-e /') -T cli ./scripts/vortex/provision.sh
no_output_timeout: 30m

#;< TOOL_PHPUNIT
- run:
name: Test with PHPUnit
command: docker compose exec -T cli vendor/bin/phpunit || [ "${VORTEX_CI_PHPUNIT_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_PHPUNIT

#;< TOOL_BEHAT
- run:
name: Test with Behat
command: |
Expand All @@ -359,6 +372,7 @@ jobs:
docker compose exec -T cli php -d memory_limit=-1 vendor/bin/behat --colors --strict --rerun --profile="${VORTEX_CI_BEHAT_PROFILE:-default}" || \
[ "${VORTEX_CI_BEHAT_IGNORE_FAILURE:-0}" -eq 1 ]
no_output_timeout: 30m
#;> TOOL_BEHAT

- run:
name: Process test logs and artifacts
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,35 +269,45 @@ jobs:
run: docker compose exec -T cli composer normalize --dry-run
continue-on-error: ${{ vars.VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE == '1' }}

#;< TOOL_PHPCS
- name: Lint code with PHPCS
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: docker compose exec -T cli vendor/bin/phpcs
continue-on-error: ${{ vars.VORTEX_CI_PHPCS_IGNORE_FAILURE == '1' }}
#;> TOOL_PHPCS

Comment on lines +272 to 278

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

Tool block markers are well-scoped; add guardrails to ensure they stay balanced

The new internal markers around PHPCS, PHPStan, Rector, PHPMD, Gherkin Lint (Behat), PHPUnit, and Behat look consistent and non-invasive. This will help the installer strip or retain steps based on selections.

Add a quick CI check (dev-only) to ensure every “#;< TOOL_” has a matching “#;> TOOL_” across both CI configs:

Also applies to: 279-285, 286-292, 293-299, 305-311, 333-338, 339-352


🏁 Script executed:

#!/bin/bash
set -euo pipefail
files=(.github/workflows/build-test-deploy.yml .circleci/config.yml)
for f in "${files[@]}"; do
  echo "Checking tool markers in $f"
  starts=$(rg -n '^#;<\s+TOOL_([A-Z_]+)\s*$' "$f" -r '$1' | sort)
  ends=$(rg -n '^#;>\s+TOOL_([A-Z_]+)\s*$' "$f" -r '$1' | sort)
  diff -u <(echo "$starts") <(echo "$ends") && echo "OK: balanced markers in $f"
done

Length of output: 357


🏁 Script executed:

#!/bin/bash
set -eu
files=(.github/workflows/build-test-deploy.yml .circleci/config.yml)
for f in "${files[@]}"; do
  echo "Checking tool markers in $f"
  # Gather start markers, ignore errors if none found
  starts=$(grep -E '^\s*#;<\s+TOOL_[A-Z_]+' "$f" || true | sed -E 's/^\s*#;<\s+TOOL_([A-Z_]+).*/\1/' | sort)
  # Gather end markers, ignore errors if none found
  ends=$(grep -E '^\s*#;>\s+TOOL_[A-Z_]+' "$f" || true | sed -E 's/^\s*#;>\s+TOOL_([A-Z_]+).*/\1/' | sort)
  echo "Starts:"
  echo "$starts"
  echo "Ends:"
  echo "$ends"
  if diff -u <(echo "$starts") <(echo "$ends") > /dev/null; then
    echo "OK: balanced markers in $f"
  else
    echo "ERROR: unbalanced tool markers in $f"
    diff -u <(echo "$starts") <(echo "$ends")
  fi
done

Length of output: 2433


🏁 Script executed:

#!/bin/bash
set -eu

files=(.github/workflows/build-test-deploy.yml .circleci/config.yml)
for f in "${files[@]}"; do
  echo "Checking tool markers in $f"
  # Gather start markers
  starts=$(grep -E '^\s*#;<\s+TOOL_[A-Z_]+' "$f" || true | sed -E 's/^\s*#;<\s+TOOL_([A-Z_]+).*/\1/' | sort)
  # Gather end markers
  ends=$(grep -E '^\s*#;>\s+TOOL_[A-Z_]+' "$f" || true | sed -E 's/^\s*#;>\s+TOOL_([A-Z_]+).*/\1/' | sort)

  # Write to temp files for reliable diff
  tmp_start=$(mktemp)
  tmp_end=$(mktemp)
  echo "$starts" > "$tmp_start"
  echo "$ends"   > "$tmp_end"

  echo "Starts:"
  cat "$tmp_start"
  echo "Ends:"
  cat "$tmp_end"

  if diff -u "$tmp_start" "$tmp_end" > /dev/null; then
    echo "OK: balanced markers in $f"
  else
    echo "ERROR: unbalanced tool markers in $f"
    diff -u "$tmp_start" "$tmp_end"
  fi

  rm -f "$tmp_start" "$tmp_end"
done

Length of output: 2233


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

files=(.github/workflows/build-test-deploy.yml .circleci/config.yml)
for f in "${files[@]}"; do
  echo "Checking tool markers in $f"
  # Extract just the marker names (e.g., TOOL_PHPCS)
  starts=$(grep -E '^\s*#;<\s+TOOL_[A-Z_]+' "$f" | sed -En 's/^\s*#;<\s+(TOOL_[A-Z_]+).*/\1/p' | sort)
  ends=$(grep -E '^\s*#;>\s+TOOL_[A-Z_]+' "$f" | sed -En 's/^\s*#;>\s+(TOOL_[A-Z_]+).*/\1/p' | sort)

  echo "Start markers:"
  echo "${starts:-<none>}"
  echo "End markers:"
  echo "${ends:-<none>}"

  # Compare lists
  missing_starts=$(comm -23 <(echo "$ends") <(echo "$starts") || true)
  missing_ends=$(comm -13 <(echo "$ends") <(echo "$starts") || true)

  if [[ -z "$missing_starts" && -z "$missing_ends" ]]; then
    echo "OK: balanced markers in $f"
  else
    echo "ERROR: unbalanced markers in $f"
    [[ -n "$missing_starts" ]] && echo "  Missing start marker for: $missing_starts"
    [[ -n "$missing_ends" ]]   && echo "  Missing end marker for:   $missing_ends"
  fi
done

Length of output: 3522


Tool markers verified as balanced across CI configs
We ran a script to compare every “#;< TOOL_” start marker against its corresponding “#;> TOOL_” end marker in both CI workflows; all seven tools (PHPCS, PHPStan, Rector, PHPMD, Behat, PHPUnit) are properly paired in:

  • .github/workflows/build-test-deploy.yml
  • .circleci/config.yml

No missing or extra markers were found, so the current blocks are correctly scoped.

• Optional: To prevent future drift, consider adding the following dev-only CI guardrail that fails if any tool block is unbalanced:

#!/bin/bash
set -euo pipefail
files=(.github/workflows/build-test-deploy.yml .circleci/config.yml)
for f in "${files[@]}"; do
  echo "Verifying markers in $f"
  starts=$(grep -E '^\s*#;<\s+TOOL_[A-Z_]+' "$f" | sed -E 's/^\s*#;<\s+(TOOL_[A-Z_]+).*/\1/' | sort)
  ends=$(grep -E '^\s*#;>\s+TOOL_[A-Z_]+' "$f" | sed -E 's/^\s*#;>\s+(TOOL_[A-Z_]+).*/\1/' | sort)
  if ! diff -u <(echo "$starts") <(echo "$ends"); then
    echo "❌ Unbalanced tool markers in $f" && exit 1
  fi
done
echo "✅ All tool markers balanced"

This will ensure that any future edits keep the markers in sync.

🤖 Prompt for AI Agents
In .github/workflows/build-test-deploy.yml around lines 272-278 there is no
guardrail to prevent future unbalanced TOOL_* markers; add a CI check that runs
the provided shell verifier and fails the job on mismatch. Implement by adding
the script (e.g., .github/scripts/verify-tool-markers.sh, make it executable) or
embedding the commands as a workflow step, then add a new workflow job or a step
in an existing job that runs the script with bash against
.github/workflows/build-test-deploy.yml and .circleci/config.yml and exits
non‑zero on diff so the workflow fails if markers are unbalanced.

#;< TOOL_PHPSTAN
- name: Lint code with PHPStan
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: docker compose exec -T cli vendor/bin/phpstan
continue-on-error: ${{ vars.VORTEX_CI_PHPSTAN_IGNORE_FAILURE == '1' }}
#;> TOOL_PHPSTAN

#;< TOOL_RECTOR
- name: Lint code with Rector
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: docker compose exec -T cli vendor/bin/rector --clear-cache --dry-run
continue-on-error: ${{ vars.VORTEX_CI_RECTOR_IGNORE_FAILURE == '1' }}
#;> TOOL_RECTOR

#;< TOOL_PHPMD
- name: Lint code with PHPMD
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: docker compose exec -T cli vendor/bin/phpmd . text phpmd.xml
continue-on-error: ${{ vars.VORTEX_CI_PHPMD_IGNORE_FAILURE == '1' }}
#;> TOOL_PHPMD

- name: Lint code with Twig CS Fixer
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: docker compose exec -T cli vendor/bin/twig-cs-fixer
continue-on-error: ${{ vars.VORTEX_CI_TWIG_CS_FIXER_IGNORE_FAILURE == '1' }}

#;< TOOL_BEHAT
- name: Lint code with Gherkin Lint
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
run: docker compose exec -T cli vendor/bin/gherkinlint lint tests/behat/features
continue-on-error: ${{ vars.VORTEX_CI_GHERKIN_LINT_IGNORE_FAILURE == '1' }}
#;> TOOL_BEHAT

- name: Lint module code with NodeJS linters
if: ${{ matrix.instance == 0 || strategy.job-total == 1 }}
Expand All @@ -320,10 +330,13 @@ jobs:
docker compose exec $(env | cut -f1 -d= | sed 's/^/-e /') -T cli ./scripts/vortex/provision.sh
timeout-minutes: 30

#;< TOOL_PHPUNIT
- name: Test with PHPUnit
run: docker compose exec -T cli vendor/bin/phpunit
continue-on-error: ${{ vars.VORTEX_CI_PHPUNIT_IGNORE_FAILURE == '1' }}
#;> TOOL_PHPUNIT

#;< TOOL_BEHAT
- name: Test with Behat
run: |
# shellcheck disable=SC2170
Expand All @@ -335,6 +348,7 @@ jobs:
VORTEX_CI_BEHAT_PROFILE: ${{ vars.VORTEX_CI_BEHAT_PROFILE }}
continue-on-error: ${{ vars.VORTEX_CI_BEHAT_IGNORE_FAILURE == '1' }}
timeout-minutes: 30
#;> TOOL_BEHAT

- name: Process test logs and artifacts
if: always()
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/vortex-test-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
run: composer install
working-directory: .vortex/installer

- name: Validate Composer configuration is normalized
run: composer normalize --dry-run
working-directory: .vortex/installer

Comment on lines +40 to +43

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)

Nice: add composer-normalize to CI; consider showing diffs for clarity

Dry-run is good. Adding --diff prints the normalized diff when the step fails, which speeds debugging.

-        run: composer normalize --dry-run
+        run: composer normalize --dry-run --diff
📝 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
- name: Validate Composer configuration is normalized
run: composer normalize --dry-run
working-directory: .vortex/installer
- name: Validate Composer configuration is normalized
run: composer normalize --dry-run --diff
working-directory: .vortex/installer
🤖 Prompt for AI Agents
.github/workflows/vortex-test-installer.yml around lines 40 to 43: the Composer
normalize step runs with --dry-run only, which hides the normalized changes;
update the run invocation to include the --diff flag (composer normalize
--dry-run --diff) so that when the step detects differences it prints the
normalized diff to the job logs for faster debugging.

- name: Check coding standards
run: composer lint
working-directory: .vortex/installer
Expand Down
9 changes: 6 additions & 3 deletions .vortex/installer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
},
"require": {
"php": ">=8.2",
"alexskrypnyk/file": "^0.8.0",
"alexskrypnyk/file": "^0.9",

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)

Bump to alexskrypnyk/file ^0.9 — verify BC across usages

This library is used transitively by File utilities (per previous learnings). Please verify no BC breaks affecting ExtendedSplFileInfo and any inherited helpers you rely on.

I can generate a quick grep-based check to list methods you call from this package across the repo if helpful.

🤖 Prompt for AI Agents
.vortex/installer/composer.json around line 21: bumping "alexskrypnyk/file" to
^0.9 may introduce BC breaks for ExtendedSplFileInfo and helpers; update the
version in composer.json, run composer update, then verify usages by grepping
the repo for references to classes/methods from that package (e.g.,
ExtendedSplFileInfo and any helper methods), run the test suite and static
analysis (phpstan/psalm) to catch signature/behavior changes, and if any
breakages are found either adapt call sites to the new API or pin to the
previous safe version in composer.json and add a note in the changelog;
optionally produce the grep list of methods called from the package and include
it in the PR for reviewer verification.

"alexskrypnyk/str2name": "^1.4",
"composer/composer": "^2.8",

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)

Adding composer/composer as a runtime dependency can bloat the installer PHAR

Using Composer\Json\JsonManipulator requires composer/composer, which is a large package. Consider alternatives:

  • Use a lightweight JSON editor (or your minimal ComposerJson wrapper without pulling the full Composer package at runtime).
  • If you only need it during build, move it to require-dev and bake the result into the PHAR.

If keeping it in require, ensure Box excludes unnecessary files to keep the PHAR lean.

Would you like a PR-ready Box config snippet to trim composer/composer from the PHAR?

🤖 Prompt for AI Agents
.vortex/installer/composer.json lines 23-23: composer/composer is currently
listed as a runtime dependency which will bloat the installer PHAR; either (A)
move "composer/composer" to require-dev and use it only during build to modify
composer.json then bake the changed files into the PHAR, (B) replace usage of
Composer\Json\JsonManipulator with a small in-repo JSON helper or a lightweight
JSON editor dependency so composer/composer is not required at runtime, or (C)
if it must remain in require, add Box packaging exclusions to strip unnecessary
files from composer/composer (tests, docs, vendor subtrees) so the PHAR stays
lean—choose one approach and apply the corresponding change (move dependency to
require-dev and adjust build scripts, implement a minimal JSON wrapper, or
update box.json/box.yml exclude rules).

"cweagans/composer-patches": "^1.7",
"czproject/git-php": "^4.3",
"laravel/prompts": "^0.3.5",
"nikic/iter": "^2.4",

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)

Confirm nikic/iter is actually used

If not used, drop it to keep the dependency tree minimal. If used only in tests, move to require-dev.

🤖 Prompt for AI Agents
.vortex/installer/composer.json around line 27: confirm whether the package
"nikic/iter" is referenced anywhere in the installer code or runtime
dependencies; if it is unused at runtime remove the entry, if it is only used in
tests move it under "require-dev" instead of "require", then run composer update
to refresh composer.lock and run the test suite or static search to verify
nothing breaks before committing the change.

"sebastian/diff": "*",
"symfony/console": "^7.3",
"symfony/filesystem": "^7.2",
Expand All @@ -48,8 +50,8 @@
},
"autoload-dev": {
"psr-4": {
"DrevOps\\VortexInstaller\\Tests\\": "tests",
"AlexSkrypnyk\\File\\Tests\\": "vendor/alexskrypnyk/file/tests"
"AlexSkrypnyk\\File\\Tests\\": "vendor/alexskrypnyk/file/tests",
"DrevOps\\VortexInstaller\\Tests\\": "tests"
},
Comment on lines +53 to 55

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)

Avoid autoloading vendor tests via PSR-4

Mapping vendor/alexskrypnyk/file/tests in autoload-dev couples your tests to vendor internals and slows composer dump-autoload. Prefer your test namespace only; import vendor fixtures explicitly if needed.

     "autoload-dev": {
       "psr-4": {
-        "AlexSkrypnyk\\File\\Tests\\": "vendor/alexskrypnyk/file/tests",
         "DrevOps\\VortexInstaller\\Tests\\": "tests"
       },
       "classmap": [
         "tests"
       ]
     },
📝 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
"AlexSkrypnyk\\File\\Tests\\": "vendor/alexskrypnyk/file/tests",
"DrevOps\\VortexInstaller\\Tests\\": "tests"
},
"autoload-dev": {
"psr-4": {
"DrevOps\\VortexInstaller\\Tests\\": "tests"
},
"classmap": [
"tests"
]
},
🤖 Prompt for AI Agents
.vortex/installer/composer.json lines 53-55: the autoload-dev maps
vendor/alexskrypnyk/file/tests into your PSR-4 config which exposes vendor
internals and slows composer autoload; remove the "AlexSkrypnyk\\File\\Tests\\":
"vendor/alexskrypnyk/file/tests" entry from autoload-dev and instead keep only
your own test namespace mapping (e.g. "DrevOps\\VortexInstaller\\Tests\\":
"tests"), and if you need vendor fixtures import them directly in tests or add a
dedicated autoload files/include in composer.json or require the vendor test
package as a dev dependency rather than PSR-4 mapping.

"classmap": [
"tests"
Expand Down Expand Up @@ -92,6 +94,7 @@
],
"reset": "rm -Rf vendor vendor-bin",
"test": "phpunit --no-coverage",
"test-baseline": "UPDATE_FIXTURES=1 phpunit --no-coverage --filter=testInstall@baseline || UPDATE_FIXTURES=1 phpunit --no-coverage --filter=testInstall@baseline",
"test-coverage": "php -d pcov.directory=. vendor/bin/phpunit",
"test-fixtures": "UPDATE_FIXTURES=1 phpunit --no-coverage --filter=testInstall"
}
Expand Down
Loading
Loading