Skip to content

Align the module on PrestaShop 8.2+ and bump to 4.0.0 - #129

Merged
jolelievre merged 4 commits into
PrestaShop:devfrom
mattgoud:align/min-ps-8.2
Sep 9, 2026
Merged

jolelievre merged 4 commits into
PrestaShop:devfrom
mattgoud:align/min-ps-8.2

Conversation

@mattgoud

@mattgoud mattgoud commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor
Questions Answers
Description? Align the module on the PrestaShop 8.2+ floor set by the compatibility cleanup epic: ps_versions_compliancy min goes from 8.1.0 to 8.2.0, the PHPStan matrix drops the 8.1.7 core it no longer supports, and the module moves to 4.0.0. Also fixes the one PHPStan 2 finding that the develop matrix surfaced.
Type? improvement
BC breaks? yes
Deprecations? no
Fixed ticket? Part of PrestaShop/PrestaShop#41648
How to test? CI: the 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.
Sponsor company @PrestaShopCorp

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 declared 8.1.0, this module among them.

What changes

  1. ps_versions_compliancy min 8.1.0 -> 8.2.0.
  2. .github/workflows/php.yml: the phpstan-74 job matrix goes from presta_version: ['8.1.7', '8.2.x'] to ['8.2.x']. The php_version axis is untouched, so PHP 7.4 and 8.1 are still both covered.
  3. tests/php/phpstan/phpstan-8.1.7.neon is deleted. The shared PrestaShop/.github PHPStan action interpolates matrix.presta_version into phpstan-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 a latest PrestaShop version since the matrix moved to explicit versions, and the file was a stale duplicate of the 9.x ones.
  4. Module version 3.2.2 -> 4.0.0 in ps_imageslider.php and config.xml. The last published release is v3.2.2 and still declares min 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.
  5. README.md: the compatibility line still announced 8.1.0, now 8.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 develop moved 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's dev was 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:586 called is_array() on the return of getSlides(), which is the output of Db::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.json still declares an old php floor. That is a wider topic across native modules and is raised on the epic rather than fixed here.

@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Sep 8, 2026
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.
@mattgoud mattgoud changed the title Align the minimum PrestaShop version on 8.2.0 Align the module and its PHPStan matrix on PrestaShop 8.2+ Sep 8, 2026
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.
@mattgoud mattgoud changed the title Align the module and its PHPStan matrix on PrestaShop 8.2+ Align the module on PrestaShop 8.2+ and bump to 4.0.0 Sep 8, 2026
@mattgoud mattgoud added this to the 4.0.0 milestone Sep 8, 2026
@mattgoud mattgoud self-assigned this Sep 8, 2026
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.
@ps-jarvis ps-jarvis added the Waiting for QA Status: Action required, Waiting for test feedback label Sep 9, 2026
@ps-jarvis ps-jarvis moved this from Ready for review to To be tested in PR Dashboard Sep 9, 2026
@jolelievre
jolelievre merged commit 23c3040 into PrestaShop:dev Sep 9, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from To be tested to Merged in PR Dashboard Sep 9, 2026
@Quetzacoalt91 Quetzacoalt91 removed the Waiting for QA Status: Action required, Waiting for test feedback label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants