-
Notifications
You must be signed in to change notification settings - Fork 57
WebP support #94
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
base: dev
Are you sure you want to change the base?
WebP support #94
Changes from all commits
6316aa7
3266d6f
c0259a2
cd9be52
83debe2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,27 +3,19 @@ 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 +27,7 @@ jobs: | |
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: '7.4' | ||
| php-version: '8.1' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm confused about the impact of this php-version change 😕 |
||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v2.0.0 | ||
|
|
@@ -58,12 +50,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.0.0', '8.1.0', 'latest'] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we should use |
||
| 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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_]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. module version need to be bumped to 4.0.0 accordingly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But why break compatibility with 1.7 if nothing in this PR actually needs version 8+? |
||
|
|
||
| $this->templateFile = 'module:ps_imageslider/views/templates/hook/slider.tpl'; | ||
| } | ||
|
|
@@ -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()); | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Patrocle I think it would be better to keep PHP checks for 7.2 to 8.1. As you probably know, PrestaShop 8.0 is compatible with PHP 7.2 to 8.1.