Skip to content

Drop PrestaShop <9 backports, require PHP 8.1+ - #339

Open
nenes25 wants to merge 2 commits into
3.xfrom
fix/337-ps9-only-compatibility
Open

Drop PrestaShop <9 backports, require PHP 8.1+#339
nenes25 wants to merge 2 commits into
3.xfrom
fix/337-ps9-only-compatibility

Conversation

@nenes25

@nenes25 nenes25 commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #337.

The 3.x line only targets PrestaShop 9, so this drops the compatibility code paths kept around for older PS/PHP versions, and refreshes tooling accordingly.

  • Bump composer.json PHP requirement to >=8.1
  • Bump prestashop/php-dev-tools to ^5, pin friendsofphp/php-cs-fixer ^3.2 directly (v5 no longer pulls it in transitively) and symfony/process to ^6.4, matching PrestaShop 9's own Symfony version — this also fixes 2 open Dependabot alerts on symfony/process (moderate + high severity), previously locked at v5.4.35
  • Regenerated composer.lock, re-ran PHP-CS-Fixer with the updated toolchain (new default ruleset: comment spacing, blank line after <?php, global-namespace FQCN over use imports for PrestaShop core classes)
  • Remove override/controllers/front/OrderController.php: its only logic was gated behind version_compare(_PS_VERSION_, '8.2.1', '<') (always false on PS9) and called a hook method already removed in [enhancement]: Remove AuthController override #335. Verified against the real PS9 core (classes/checkout/CheckoutPersonalInformationStep.php) that the modern checkout flow already fires actionSubmitAccountBefore natively for account creation during checkout, so nothing is lost
  • Bump ps_versions_compliancy min from 1.7.0.0 to 9.0.0
  • Drop the PHP 1.7.8.11 PHPStan config/ignore rule (RegistrationController always exists on PS9+) and the now-redundant phpstan-8.2.3.neon / phpstan-latest.neon (identical to the base config, the script already falls back to it when no version-specific file exists)
  • CI: syntax check and PHPStan matrix now run against PHP 8.1 through 8.5 only (dropped 7.2/7.3/7.4); PHPStan matrix targets prestashop/prestashop:9.1.4-8.x images instead of 1.7.8.11 / 8.2.3

Historical upgrade/*.php scripts are left behaviorally untouched (only whitespace changes from the CS-Fixer pass) since they document past upgrades for existing installs.

Test plan

  • composer install succeeds on PHP 8.1
  • CI green (syntax check 8.1-8.5, PHP-CS-Fixer, PHPStan 8.1-8.5)
  • Install/upgrade module on a PS 9.1.4 test instance
  • Guest checkout account creation still validates captcha (via native actionSubmitAccountBefore, no more OrderController override)

@nenes25
nenes25 force-pushed the fix/337-ps9-only-compatibility branch from 3729aae to dc8d5d9 Compare July 3, 2026 06:32
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