From 6b7599ec64a975516ad2e8845e0dfcc321614bde Mon Sep 17 00:00:00 2001 From: Uryvskiy Dima Date: Thu, 24 Aug 2023 09:25:03 +0300 Subject: [PATCH] ref #90598 Changed the minimum supported versions of PrestaShop and PHP (#215) --- .github/workflows/presta.yml | 14 ++------------ CHANGELOG.md | 3 +++ Makefile | 12 +++--------- README.md | 2 +- VERSION | 2 +- retailcrm/retailcrm.php | 9 ++------- 6 files changed, 12 insertions(+), 30 deletions(-) diff --git a/.github/workflows/presta.yml b/.github/workflows/presta.yml index cbf3a80..0d9a463 100644 --- a/.github/workflows/presta.yml +++ b/.github/workflows/presta.yml @@ -15,23 +15,13 @@ jobs: matrix: include: - php-version: '7.1' - branch: '1.7.4.4' + branch: '1.7.7.0' composerv1: 1 phpunit-version: 'phpunit:6.4.3' - php-version: '7.2' - branch: '1.7.4.4' + branch: '1.7.7.0' composerv1: 1 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' branch: '1.7.7.8' composerv1: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index d9cbbdc..63c3f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v3.5.7 +* Изменены минимально поддерживаемые версии PrestaShop и PHP + ## v3.5.6 * Исправление передачи брошенных корзин diff --git a/Makefile b/Makefile index 7b68364..ca6e6c0 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ delete_archive: rm -f $(ARCHIVE_NAME) 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) cd $(PRESTASHOP_DIR) && php composer.phar install --prefer-dist --no-interaction --no-progress else @@ -56,18 +56,13 @@ else endif endif -fix-version-bugs: +# Required for versions 1.7.7.x +fix-version-lang-bugs: ifeq ($(COMPOSERV1),1) cd $(PRESTASHOP_DIR) \ && sed -i 's/throw new Exception/#throw new Exception/g' src/PrestaShopBundle/Install/DatabaseDump.php 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) \ && 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 = ' @@ -75,7 +70,6 @@ ifeq ($(BRANCH),$(filter $(BRANCH),1.7.6.9 1.7.7.8)) cd $(PRESTASHOP_DIR) \ && 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 = ' -endif lint: php-cs-fixer fix --config=$(ROOT_DIR)/.php-cs-fixer.php -v diff --git a/README.md b/README.md index b1a434b..fae3bce 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![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) [![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. ================= diff --git a/VERSION b/VERSION index c492825..3cf5751 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.6 +3.5.7 diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index c1d77ea..be7761d 100644 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -48,7 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php'; class RetailCRM extends Module { - const VERSION = '3.5.6'; + const VERSION = '3.5.7'; const API_URL = 'RETAILCRM_ADDRESS'; const API_KEY = 'RETAILCRM_API_TOKEN'; @@ -161,7 +161,7 @@ class RetailCRM extends Module $this->default_country = (int) Configuration::get('PS_COUNTRY_DEFAULT'); $this->apiUrl = Configuration::get(static::API_URL); $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->log = RetailcrmLogger::getLogFile(); $this->module_key = 'dff3095326546f5fe8995d9e86288491'; @@ -172,11 +172,6 @@ class RetailCRM extends Module $this->name . '/views'; - if ('1.6' == $this->psVersion) { - $this->bootstrap = true; - $this->use_new_hooks = false; - } - if ($this->apiUrl && $this->apiKey) { $this->api = new RetailcrmProxy($this->apiUrl, $this->apiKey); $this->reference = new RetailcrmReferences($this->api);