ref #90598 Changed the minimum supported versions of PrestaShop and PHP (#215)

This commit is contained in:
Uryvskiy Dima 2023-08-24 09:25:03 +03:00 committed by GitHub
parent f615979fc7
commit 6b7599ec64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 30 deletions

View File

@ -15,23 +15,13 @@ jobs:
matrix: matrix:
include: include:
- php-version: '7.1' - php-version: '7.1'
branch: '1.7.4.4' branch: '1.7.7.0'
composerv1: 1 composerv1: 1
phpunit-version: 'phpunit:6.4.3' phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2' - php-version: '7.2'
branch: '1.7.4.4' branch: '1.7.7.0'
composerv1: 1 composerv1: 1
phpunit-version: 'phpunit:6.4.3' phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
branch: '1.7.6.9'
composerv1: 1
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
branch: '1.7.6.9'
composerv1: 1
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1' - php-version: '7.1'
branch: '1.7.7.8' branch: '1.7.7.8'
composerv1: 1 composerv1: 1

View File

@ -1,3 +1,6 @@
## v3.5.7
* Изменены минимально поддерживаемые версии PrestaShop и PHP
## v3.5.6 ## v3.5.6
* Исправление передачи брошенных корзин * Исправление передачи брошенных корзин

View File

@ -14,7 +14,7 @@ delete_archive:
rm -f $(ARCHIVE_NAME) rm -f $(ARCHIVE_NAME)
rm -f /tmp/retailcrm.zip rm -f /tmp/retailcrm.zip
composer: clone_prestashop clone_composer fix-version-bugs composer: clone_prestashop clone_composer fix-version-lang-bugs
ifeq ($(COMPOSERV1),1) ifeq ($(COMPOSERV1),1)
cd $(PRESTASHOP_DIR) && php composer.phar install --prefer-dist --no-interaction --no-progress cd $(PRESTASHOP_DIR) && php composer.phar install --prefer-dist --no-interaction --no-progress
else else
@ -56,18 +56,13 @@ else
endif endif
endif endif
fix-version-bugs: # Required for versions 1.7.7.x
fix-version-lang-bugs:
ifeq ($(COMPOSERV1),1) ifeq ($(COMPOSERV1),1)
cd $(PRESTASHOP_DIR) \ cd $(PRESTASHOP_DIR) \
&& sed -i 's/throw new Exception/#throw new Exception/g' src/PrestaShopBundle/Install/DatabaseDump.php && sed -i 's/throw new Exception/#throw new Exception/g' src/PrestaShopBundle/Install/DatabaseDump.php
endif endif
ifeq ($(BRANCH), 1.7.4.4)
cd $(PRESTASHOP_DIR) \
&& sed -i 's/$$install->installModules();/$$install->setTranslator(\\Context::getContext()->getTranslator());\n\t$$install->installModules();/g' tests/PrestaShopBundle/Utils/DatabaseCreator.php
cat $(PRESTASHOP_DIR)/tests/PrestaShopBundle/Utils/DatabaseCreator.php | grep -A 3 -B 3 'install->installModules()'
endif
ifeq ($(BRANCH),$(filter $(BRANCH),1.7.6.9 1.7.7.8))
cd $(PRESTASHOP_DIR) \ cd $(PRESTASHOP_DIR) \
&& sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/lang/DataLang.php && sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/lang/DataLang.php
cat $(PRESTASHOP_DIR)/classes/lang/DataLang.php | grep -A 3 -B 3 'this->translator = ' cat $(PRESTASHOP_DIR)/classes/lang/DataLang.php | grep -A 3 -B 3 'this->translator = '
@ -75,7 +70,6 @@ ifeq ($(BRANCH),$(filter $(BRANCH),1.7.6.9 1.7.7.8))
cd $(PRESTASHOP_DIR) \ cd $(PRESTASHOP_DIR) \
&& sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/Language.php && sed -i "s/SymfonyContainer::getInstance()->get('translator')/\\\\Context::getContext()->getTranslator()/g" classes/Language.php
cat $(PRESTASHOP_DIR)/classes/Language.php | grep -A 3 -B 3 'translator = ' cat $(PRESTASHOP_DIR)/classes/Language.php | grep -A 3 -B 3 'translator = '
endif
lint: lint:
php-cs-fixer fix --config=$(ROOT_DIR)/.php-cs-fixer.php -v php-cs-fixer fix --config=$(ROOT_DIR)/.php-cs-fixer.php -v

View File

@ -1,7 +1,7 @@
[![Build Status](https://github.com/retailcrm/prestashop-module/workflows/presta/badge.svg)](https://github.com/retailcrm/prestashop-module/actions) [![Build Status](https://github.com/retailcrm/prestashop-module/workflows/presta/badge.svg)](https://github.com/retailcrm/prestashop-module/actions)
[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/prestashop-module/master.svg?logo=github)](https://codecov.io/gh/retailcrm/prestashop-module) [![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/prestashop-module/master.svg?logo=github)](https://codecov.io/gh/retailcrm/prestashop-module)
[![GitHub release](https://img.shields.io/github/release/retailcrm/prestashop-module.svg?logo=codecov)](https://github.com/retailcrm/prestashop-module/releases) [![GitHub release](https://img.shields.io/github/release/retailcrm/prestashop-module.svg?logo=codecov)](https://github.com/retailcrm/prestashop-module/releases)
[![PHP version](https://img.shields.io/badge/PHP->=5.6-blue.svg?logo=php)](https://php.net/) [![PHP version](https://img.shields.io/badge/PHP->=7.1-blue.svg?logo=php)](https://php.net/)
Prestashop module. Prestashop module.
================= =================

View File

@ -1 +1 @@
3.5.6 3.5.7

View File

@ -48,7 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php';
class RetailCRM extends Module class RetailCRM extends Module
{ {
const VERSION = '3.5.6'; const VERSION = '3.5.7';
const API_URL = 'RETAILCRM_ADDRESS'; const API_URL = 'RETAILCRM_ADDRESS';
const API_KEY = 'RETAILCRM_API_TOKEN'; const API_KEY = 'RETAILCRM_API_TOKEN';
@ -161,7 +161,7 @@ class RetailCRM extends Module
$this->default_country = (int) Configuration::get('PS_COUNTRY_DEFAULT'); $this->default_country = (int) Configuration::get('PS_COUNTRY_DEFAULT');
$this->apiUrl = Configuration::get(static::API_URL); $this->apiUrl = Configuration::get(static::API_URL);
$this->apiKey = Configuration::get(static::API_KEY); $this->apiKey = Configuration::get(static::API_KEY);
$this->ps_versions_compliancy = ['min' => '1.6.1.0', 'max' => _PS_VERSION_]; $this->ps_versions_compliancy = ['min' => '1.7.7.0', 'max' => _PS_VERSION_];
$this->psVersion = Tools::substr(_PS_VERSION_, 0, 3); $this->psVersion = Tools::substr(_PS_VERSION_, 0, 3);
$this->log = RetailcrmLogger::getLogFile(); $this->log = RetailcrmLogger::getLogFile();
$this->module_key = 'dff3095326546f5fe8995d9e86288491'; $this->module_key = 'dff3095326546f5fe8995d9e86288491';
@ -172,11 +172,6 @@ class RetailCRM extends Module
$this->name . $this->name .
'/views'; '/views';
if ('1.6' == $this->psVersion) {
$this->bootstrap = true;
$this->use_new_hooks = false;
}
if ($this->apiUrl && $this->apiKey) { if ($this->apiUrl && $this->apiKey) {
$this->api = new RetailcrmProxy($this->apiUrl, $this->apiKey); $this->api = new RetailcrmProxy($this->apiUrl, $this->apiKey);
$this->reference = new RetailcrmReferences($this->api); $this->reference = new RetailcrmReferences($this->api);