-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump minimum compatibility to PHP 7.1.3 and PS 1.7.7 for Native Modules #32841
Bump minimum compatibility to PHP 7.1.3 and PS 1.7.7 for Native Modules #32841
Comments
Hello, Thanks for reporting this issue! Thanks in advance! |
Hello @leemyongpakvn I think it's a great idea 👍 In a module, we cannot mark "this module is NOT compatible with PHP {...}" (we can mark it in composer.json but it will not be scanned by PrestaShop) however we can mark "this module compatibility range is {...} to {...}" As each Core version has a dedicated PHP range, it follows. For example if you say the module minimum Core version is 1.7.7, as 1.7.7 min PHP version is 7.1 then it can be understood as "the module minimum PHP version is 7.1" I love this idea, but to be sure let me ask the opinion of @PrestaShop/committers |
Indeed, I have already gone through modules in php 5.4 and with older versions of phpstan. The PHP version of the modules must follow the PHP version of prestashop, taking into account their compatibility range. |
I like the idea. |
@matks I chose PHP 7.1.3 and PS 1.7.7 because of this composer.json.
from module's composer.json. That way, we can keep support for PHP 7.1.3 and PS 1.7.7 in production environment (merchants won't be shocked ;), while allow devs using php-dev-tools v4 and php-cs-fixer v3 (those require PHP 7.2) in development environment. |
@leemyongpakvn, it seems to be a good idea to me for PHP 7.1 instead of oldies versions. |
@leemyongpakvn yes, that's a good idea, because if you have platform requirement composer will throw you a warning if you don't meet requirements, so if we have:
and you, for example, generate autoloader, i'll check whether the version of PHP is correct |
Idea approved 👍 and I change the labels: it's not a Bug it's a Feature |
Full list:
|
Prerequisites
Describe the bug and add attachments
Many native modules are keeping support for PHP 5.6 or even PHP 5.4 like ps_imageslider, ps_languageselector, and many others :). It is a security issue because PHP 5.6 was EOL since 31 Dec 2018, and it also prevents phpstan 0.12 running inside composer.json.
Beside that, we need to drop PHP test for PHP 5.6 and PS 1.7.6 and previous version also.
Progi1984 already bumped min compat to PHP 7.2 and PS 8.0 for blockwishlist and ps_linklist. I will apply changes for a dozen of modules, other contributors are welcomed to do the rest ;)
Expected behavior
Bump minimum compatibility to PHP 7.1.3 and PS 1.7.7 in composer.json.
Drop PHP test for PHP 5.4 and PS 1.7.6 and previous version.
Steps to reproduce
Please check links in Description.
PrestaShop version(s) where the bug happened
1.7.4, 1.7.5, 1.7.6
PHP version(s) where the bug happened
PHP 5.6
If your bug is related to a module, specify its name and its version
No response
Your company or customer's name goes here (if applicable).
No response
The text was updated successfully, but these errors were encountered: