Skip to content

fix(flashlight): read the PrestaShop version from src/Core/Version.php - #13

Merged
PrestaEdit merged 1 commit into
mainfrom
fix/ps-version-source-fallback
Nov 24, 2026
Merged

PrestaEdit merged 1 commit into
mainfrom
fix/ps-version-source-fallback

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

For a Flashlight tag without a version (latest, nightly…), when the image does not set PS_VERSION, the fallback read app/AppKernel.php. That file only declares the version itself on 1.7: from 8.0 it says const VERSION = Version::VERSION; and the literal sits in src/Core/Version.php, so on 8.x and 9.x the fallback found nothing and PRESTAFLOW_PS_VERSION was left unset with a warning.

Change

readSourceVersionPhp() (in src/flashlight/ps-version.ts, exported) reads src/Core/Version.php first, then app/AppKernel.php. Tests run the PHP snippet with the local php on the shapes of the real files (8+, 1.7, none). dist/ rebuilt; its diff only carries this change.

Checked

  • The PHP snippet run inside the Flashlight images: 1.7.8.11 → 1.7.8.11, 8.1.7 → 8.1.7, 8.2.8 → 8.2.8, 9.0.0 → 9.0.0, 9.2.0 → 9.2.0 (the old one printed nothing from 8.1.7 on).
  • npm run all: lint, 131 tests and build pass.
    No change in practice while the images set PS_VERSION, as all current Flashlight images do.

🤖 Generated with Claude Code

For a tag without a version, when the image does not set PS_VERSION, the
fallback read app/AppKernel.php, which only declares the version itself
on 1.7: from 8.0 it says `const VERSION = Version::VERSION;` and the
literal sits in src/Core/Version.php. Read src/Core/Version.php first,
then app/AppKernel.php. Checked on the 1.7.8.11, 8.1.7, 8.2.8, 9.0.0 and
9.2.0 Flashlight images.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PrestaEdit
PrestaEdit merged commit 840c8f9 into main Nov 24, 2026
1 check passed
@PrestaEdit
PrestaEdit deleted the fix/ps-version-source-fallback branch November 24, 2026 13:04
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