Prestashop模块-至少需要PHP 7.1



我找不到任何相关信息。prestshop模块是否有可能阻止安装/升级到需要PHP 7.1的模块?

我可以使用命令退出进程,但它还是会安装插件。

<?php
if (version_compare(PHP_VERSION, '7.1.0', '<')) {
exit;
}

WordPress有一个很好的方式来处理这个问题,通过在自述文件中添加一个' require PHP'行。

提前感谢。

编辑:我在他们的GitHub中打开了一个问题:https://github.com/PrestaShop/PrestaShop/issues/25578

只需将其添加到模块的主文件中,就可以了

if (!defined('_PS_VERSION_') || version_compare(PHP_VERSION, '7.1.0', '<')
exit;
}
class CrezzurModule extends Module
{
public function __construct()
{
$this->name = 'crezzurmodule';
$this->tab = 'front_office_features';
$this->version = '1.0.4';
...

最新更新