fix(flashlight): export PRESTAFLOW_PS_VERSION for version-aware Page lookup#6
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The PHP library's
importPage()dispatches to a versioned namespace (Pages\\v8,Pages\\v9, …) based onPRESTAFLOW_PS_VERSION. Without it, the lib defaults to v8. A workflow withflashlight: true+ps-version: '9.0.0'would boot PS 9.0.0 but the tests tried to load v8 Pages and crashed with:Reproduced against prestaflow-prestashop/actions/runs/29169360995.
Fix
When Flashlight is on, also export
PRESTAFLOW_PS_VERSIONset toinputs.psVersion. The lib picks the matching Page namespace.PRESTAFLOW_LOCALEstays a user-side concern (locale-specific test fixtures) — pass it via workflow-levelenv:if needed.Test plan
prestaflow-prestashop#2after merge — expect Page classes to resolve.🤖 Generated with Claude Code