Repository navigation
fix(flashlight): read the PrestaShop version from src/Core/Version.php - #13
Merged
Merged
Conversation
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]>
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.
For a Flashlight tag without a version (
latest,nightly…), when the image does not setPS_VERSION, the fallback readapp/AppKernel.php. That file only declares the version itself on 1.7: from 8.0 it saysconst VERSION = Version::VERSION;and the literal sits insrc/Core/Version.php, so on 8.x and 9.x the fallback found nothing andPRESTAFLOW_PS_VERSIONwas left unset with a warning.Change
readSourceVersionPhp()(insrc/flashlight/ps-version.ts, exported) readssrc/Core/Version.phpfirst, thenapp/AppKernel.php. Tests run the PHP snippet with the localphpon the shapes of the real files (8+, 1.7, none).dist/rebuilt; its diff only carries this change.Checked
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