Repository navigation
Align the module on PrestaShop 8.2+ and bump to 4.0.0 - #129
Merged
Merged
Conversation
The module now declares 8.2.0 as its minimum, so testing 8.1.7 no longer matches what it supports. Removes the orphaned phpstan-8.1.7.neon along with the matrix entry, since the shared PHPStan action derives the config filename from matrix.presta_version. Also removes tests/php/phpstan/phpstan-latest.neon, which no workflow has referenced since the matrix moved to explicit PrestaShop versions.
Raising the minimum PrestaShop version from 1.7.x to 8.2.0 is a breaking change, so the next release is a major. Also updates the compatibility line of the README, which still announced 8.1.0.
PrestaShop develop moved from PHPStan 1.x to 2.x with PrestaShop/PrestaShop#42252, merged on 2026-09-04. This module's dev branch was last analysed on 2026-08-31, so this is its first run under PHPStan 2 and the finding predates this PR. getSlides() returns the output of Db::executeS(), typed as an array by the php-dev-tools stub, so is_array() on it is always true. The guard was also the only one of its kind: getSlides() itself and its two other callers all iterate the return value directly.
Quetzacoalt91
approved these changes
Sep 9, 2026
jolelievre
approved these changes
Sep 9, 2026
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.
ps_versions_compliancymin goes from8.1.0to8.2.0, the PHPStan matrix drops the8.1.7core it no longer supports, and the module moves to4.0.0. Also fixes the one PHPStan 2 finding that thedevelopmatrix surfaced.PHPStan (PHP 7.4 - 8.1)job must now run twice (8.2.x x 7.4 and 8.2.x x 8.1) instead of four times, and every PHPStan job must be green. Functionally: on a PrestaShop 8.1 shop the module must be reported as incompatible, on 8.2 and above it installs and configures normally, the Module Manager must show version 4.0.0, and the home page slider must still render its slides with their sizes.Why
The Modules - Cleaning Compatibility epic sets the floor at PS 8.2+. Nineteen of the twenty-two native modules raised during this campaign declare
8.2.0; three still declared8.1.0, this module among them.What changes
ps_versions_compliancymin8.1.0->8.2.0..github/workflows/php.yml: thephpstan-74job matrix goes frompresta_version: ['8.1.7', '8.2.x']to['8.2.x']. Thephp_versionaxis is untouched, so PHP 7.4 and 8.1 are still both covered.tests/php/phpstan/phpstan-8.1.7.neonis deleted. The sharedPrestaShop/.githubPHPStan action interpolatesmatrix.presta_versionintophpstan-config, so that file becomes unreachable the moment the matrix entry goes, and a leftover neon rots silently.Same for
tests/php/phpstan/phpstan-latest.neon: no workflow has referenced alatestPrestaShop version since the matrix moved to explicit versions, and the file was a stale duplicate of the 9.x ones.3.2.2->4.0.0inps_imageslider.phpandconfig.xml. The last published release isv3.2.2and still declaresmin 1.7.5.0, so raising the floor to 8.2.0 is a breaking change for the shops that version supports, which makes the next release a major.README.md: the compatibility line still announced8.1.0, now8.2.0.The other four PHPStan jobs (
9.0.3,9.1.5,9.2.x,develop) are unchanged.The develop matrix turned red, and it is not this PR
PrestaShop
developmoved from PHPStan 1.x to 2.x with PrestaShop/PrestaShop#42252, merged on 2026-09-04. The workflow runs../../vendor/bin/phpstan, so the binary comes from the analysed branch. This module'sdevwas last analysed on 2026-08-31, four days before that bump, so this PR is simply its first run under PHPStan 2 and the finding predates it.ps_imageslider.php:586calledis_array()on the return ofgetSlides(), which is the output ofDb::executeS(), typed as an array by the php-dev-tools stub. The condition is therefore always true. The guard was also the only one of its kind in the file:getSlides()itself iterates its result directly at line 737, and so do its two other callers at lines 249 and 796. Removed rather than suppressed, consistent with how the same finding was handled in PrestaShop/ps_facetedsearch#1327.Out of scope
The PHP support item of the epic is already satisfied here: the syntax check job covers 7.2 to 8.5. Unrelated to this PR,
composer.jsonstill declares an oldphpfloor. That is a wider topic across native modules and is raised on the epic rather than fixed here.