Skip to content

fix(flashlight): export PRESTAFLOW_PS_VERSION for version-aware Page lookup#6

Merged
PrestaEdit merged 1 commit into
mainfrom
fix/export-ps-version
Jul 11, 2026
Merged

fix(flashlight): export PRESTAFLOW_PS_VERSION for version-aware Page lookup#6
PrestaEdit merged 1 commit into
mainfrom
fix/export-ps-version

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

Bug

The PHP library's importPage() dispatches to a versioned namespace (Pages\\v8, Pages\\v9, …) based on PRESTAFLOW_PS_VERSION. Without it, the lib defaults to v8. A workflow with flashlight: true + ps-version: '9.0.0' would boot PS 9.0.0 but the tests tried to load v8 Pages and crashed with:

ERROR Class "Tests\PrestaFlow\Shop\Pages\v8\Front\GuestTracking\Page" not found

Reproduced against prestaflow-prestashop/actions/runs/29169360995.

Fix

When Flashlight is on, also export PRESTAFLOW_PS_VERSION set to inputs.psVersion. The lib picks the matching Page namespace.

PRESTAFLOW_LOCALE stays a user-side concern (locale-specific test fixtures) — pass it via workflow-level env: if needed.

Test plan

  • Existing 43 tests pass.
  • Bundle rebuilt.
  • Re-run the v2 workflow on prestaflow-prestashop#2 after merge — expect Page classes to resolve.

🤖 Generated with Claude Code

…ght Page namespace

The PHP library's importPage() dispatches to a versioned namespace
(Pages\v8, Pages\v9, ...) based on the PRESTAFLOW_PS_VERSION env
var. Without it, the lib defaults to v8, so a workflow with
flashlight: true + ps-version: '9.0.0' would boot PS 9.0.0 but the
tests would try to load v8 Pages and crash with
  ERROR Class "...\Shop\Pages\v8\Front\GuestTracking\Page" not found

Now: when Flashlight is on, we also export PRESTAFLOW_PS_VERSION set
to inputs.psVersion. The lib picks the matching Page namespace.

PRESTAFLOW_LOCALE stays a user-side concern (locale-specific test
fixtures) — pass it via workflow-level env if needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@PrestaEdit
PrestaEdit merged commit 9e35514 into main Jul 11, 2026
1 check passed
@PrestaEdit
PrestaEdit deleted the fix/export-ps-version branch July 11, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant