From 6316aa7eb45c7e28f60de4c3d4f58b2adb8af16a Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 17 Aug 2023 16:24:31 +0200 Subject: [PATCH 1/4] webp support --- ps_imageslider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ps_imageslider.php b/ps_imageslider.php index ce42ddb..426c87d 100644 --- a/ps_imageslider.php +++ b/ps_imageslider.php @@ -480,9 +480,10 @@ protected function _postProcess() 'gif', 'jpeg', 'png', + 'webp', ] ) && - in_array($type, ['jpg', 'gif', 'jpeg', 'png']) + in_array($type, ['jpg', 'gif', 'jpeg', 'png', 'webp']) ) { $temp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS'); $salt = sha1(microtime()); From c0259a26c7970b5ee6543627d40696babdeadc12 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 18 Aug 2023 11:18:55 +0200 Subject: [PATCH 2/4] WebP support start with Prestashop 8.0.0 min --- ps_imageslider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ps_imageslider.php b/ps_imageslider.php index 426c87d..0fb9ef4 100644 --- a/ps_imageslider.php +++ b/ps_imageslider.php @@ -62,7 +62,7 @@ public function __construct() $this->displayName = $this->trans('Image slider', [], 'Modules.Imageslider.Admin'); $this->description = $this->trans('Add sliding images to your homepage to welcome your visitors in a visual and friendly way.', [], 'Modules.Imageslider.Admin'); - $this->ps_versions_compliancy = ['min' => '1.7.4.0', 'max' => _PS_VERSION_]; + $this->ps_versions_compliancy = ['min' => '8.0.0', 'max' => _PS_VERSION_]; $this->templateFile = 'module:ps_imageslider/views/templates/hook/slider.tpl'; } From cd9be52f51c23675a965cd210c0c5c9cb263c556 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 18 Aug 2023 12:12:23 +0200 Subject: [PATCH 3/4] CI prestshop 8.1.0 & php 8.1 --- .github/workflows/php.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 4911c85..42debd6 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -3,27 +3,12 @@ on: [push, pull_request] jobs: # Check there is no syntax errors in the project php-linter: - name: PHP Syntax check 5.6 => 8.1 + name: PHP Syntax check 8.1 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2.0.0 - - name: PHP syntax checker 5.6 - uses: prestashop/github-action-php-lint/5.6@master - - - name: PHP syntax checker 7.2 - uses: prestashop/github-action-php-lint/7.2@master - - - name: PHP syntax checker 7.3 - uses: prestashop/github-action-php-lint/7.3@master - - - name: PHP syntax checker 7.4 - uses: prestashop/github-action-php-lint/7.4@master - - - name: PHP syntax checker 8.0 - uses: prestashop/github-action-php-lint/8.0@master - - name: PHP syntax checker 8.1 uses: prestashop/github-action-php-lint/8.1@master @@ -35,7 +20,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' - name: Checkout uses: actions/checkout@v2.0.0 @@ -58,12 +43,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest'] + presta-versions: ['8.1.0', 'latest'] steps: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' - name: Checkout uses: actions/checkout@v2.0.0 From 83debe2b8ced978a19724a0640cc0d523d5ca1d2 Mon Sep 17 00:00:00 2001 From: Louis B Date: Tue, 22 Aug 2023 15:56:21 +0200 Subject: [PATCH 4/4] GitHub workflow - check PHP compatibility between 7.2 and 8.1 - check PrestaShop compatibility 8.0.0 and 8.1.0 --- .github/workflows/php.yml | 11 +++++++++-- tests/phpstan/phpstan-1.7.6.neon | 2 -- tests/phpstan/phpstan-1.7.7.neon | 2 -- tests/phpstan/phpstan-1.7.8.neon | 2 -- .../{phpstan-1.7.4.4.neon => phpstan-8.0.0.neon} | 0 .../{phpstan-1.7.5.1.neon => phpstan-8.1.0.neon} | 0 6 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 tests/phpstan/phpstan-1.7.6.neon delete mode 100644 tests/phpstan/phpstan-1.7.7.neon delete mode 100644 tests/phpstan/phpstan-1.7.8.neon rename tests/phpstan/{phpstan-1.7.4.4.neon => phpstan-8.0.0.neon} (100%) rename tests/phpstan/{phpstan-1.7.5.1.neon => phpstan-8.1.0.neon} (100%) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 42debd6..7f51d6c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -8,7 +8,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2.0.0 - + - name: PHP syntax checker 7.2 + uses: prestashop/github-action-php-lint/7.2@master + - name: PHP syntax checker 7.3 + uses: prestashop/github-action-php-lint/7.3@master + - name: PHP syntax checker 7.4 + uses: prestashop/github-action-php-lint/7.4@master + - name: PHP syntax checker 8.0 + uses: prestashop/github-action-php-lint/8.0@master - name: PHP syntax checker 8.1 uses: prestashop/github-action-php-lint/8.1@master @@ -43,7 +50,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['8.1.0', 'latest'] + presta-versions: ['8.0.0', '8.1.0', 'latest'] steps: - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon deleted file mode 100644 index 3e0e93c..0000000 --- a/tests/phpstan/phpstan-1.7.6.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon deleted file mode 100644 index 3e0e93c..0000000 --- a/tests/phpstan/phpstan-1.7.7.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon deleted file mode 100644 index 3e0e93c..0000000 --- a/tests/phpstan/phpstan-1.7.8.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan-1.7.4.4.neon b/tests/phpstan/phpstan-8.0.0.neon similarity index 100% rename from tests/phpstan/phpstan-1.7.4.4.neon rename to tests/phpstan/phpstan-8.0.0.neon diff --git a/tests/phpstan/phpstan-1.7.5.1.neon b/tests/phpstan/phpstan-8.1.0.neon similarity index 100% rename from tests/phpstan/phpstan-1.7.5.1.neon rename to tests/phpstan/phpstan-8.1.0.neon