From 4dd0a8731529d5151c2a64e63a78b3fe3a7c45cb Mon Sep 17 00:00:00 2001
From: margud
Date: Wed, 7 Sep 2022 13:05:34 +0300
Subject: [PATCH 1/2] release changes
---
.github/workflows/midnight_status_check.yml | 85 ---------------------
.github/workflows/test.yml | 4 +-
controllers/front/return.php | 1 +
tests/phpstan/phpstan1.7.6.8.neon | 3 -
tests/phpstan/phpstan1.7.7.0.neon | 3 -
5 files changed, 3 insertions(+), 93 deletions(-)
delete mode 100644 .github/workflows/midnight_status_check.yml
delete mode 100644 tests/phpstan/phpstan1.7.6.8.neon
delete mode 100644 tests/phpstan/phpstan1.7.7.0.neon
diff --git a/.github/workflows/midnight_status_check.yml b/.github/workflows/midnight_status_check.yml
deleted file mode 100644
index 126834bba..000000000
--- a/.github/workflows/midnight_status_check.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-name: Regular midnight test runs
-on:
- schedule:
- #- cron: '*/5 * * * *'
- - cron: '0 0 * * 5'
-jobs:
- cypress-e2e-ps16:
- runs-on: ubuntu-latest
-# strategy:
-# fail-fast: false
-# matrix:
-# # Set N number of parallel jobs you want to run tests on.
-# # Use higher number if you have slow tests to split them on more parallel jobs.
-# # Remember to update ci_node_index below to 0..N-1
-# ci_node_total: [7]
-# # set N-1 indexes for parallel jobs
-# # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
-# ci_node_index: [0, 1, 2, 3, 4, 5, 6, 7]
- steps:
-
- - name: Checkout
- uses: actions/checkout@v2.0.0
-
- - name: NPM install
- run: npm ci
-
- - name: Run Cypress
- run: npx cypress run --env demousername=${{ secrets.DEMO_USER }},demopassword=${{ secrets.DEMO_PASS }},FO_username=${{ secrets.MOLLIE_FO_USR }},FO_password=${{ secrets.MOLLIE_FO_PSW }},mollie_test_api_key=${{ secrets.MOLLIE_TEST_API_KEY }},mollie_test_profile_id=${{ secrets.MOLLIE_TEST_PROFILE_ID }} -s "https://github.com/mollie/PrestaShop/blob/e2e-tests/cypress/integration/ps16/**"
- #--parallel --record --key fe20a60a-0ac6-4956-a6e8-911aad86cb03
-
- - name: Archive videos and screenshots
- if: ${{ always() }}
- uses: actions/upload-artifact@v2
- with:
- name: videos_screenshots
- retention-days: 1
- path: |
- cypress/videos
- cypress/screenshots
-
- cypress-e2e-ps17:
- runs-on: ubuntu-latest
- steps:
-
- - name: Checkout
- uses: actions/checkout@v2.0.0
-
- - name: NPM install
- run: npm ci
-
- - name: Run Cypress
- run: npx cypress run --env demousername=${{ secrets.DEMO_USER }},demopassword=${{ secrets.DEMO_PASS }},FO_username=${{ secrets.MOLLIE_FO_USR }},FO_password=${{ secrets.MOLLIE_FO_PSW }},mollie_test_api_key=${{ secrets.MOLLIE_TEST_API_KEY }},mollie_test_profile_id=${{ secrets.MOLLIE_TEST_PROFILE_ID }} -s "https://github.com/mollie/PrestaShop/blob/e2e-tests/cypress/integration/ps17/**"
-
- - name: Archive videos and screenshots
- if: ${{ always() }}
- uses: actions/upload-artifact@v2
- with:
- name: videos_screenshots
- retention-days: 1
- path: |
- cypress/videos
- cypress/screenshots
-
- cypress-e2e-ps177:
- runs-on: ubuntu-latest
- steps:
-
- - name: Checkout
- uses: actions/checkout@v2.0.0
-
- - name: NPM install
- run: npm ci
-
- - name: Run Cypress
- run: npx cypress run --env demousername=${{ secrets.DEMO_USER }},demopassword=${{ secrets.DEMO_PASS }},FO_username=${{ secrets.MOLLIE_FO_USR }},FO_password=${{ secrets.MOLLIE_FO_PSW }},mollie_test_api_key=${{ secrets.MOLLIE_TEST_API_KEY }},mollie_test_profile_id=${{ secrets.MOLLIE_TEST_PROFILE_ID }} -s "https://github.com/mollie/PrestaShop/blob/e2e-tests/cypress/integration/ps177/**"
-
- - name: Archive videos and screenshots
- if: ${{ always() }}
- uses: actions/upload-artifact@v2
- with:
- name: videos_screenshots
- retention-days: 1
- path: |
- cypress/videos
- cypress/screenshots
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d970464ea..7c089adf3 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: [ '7.1' ]
+ php-versions: [ '5.6' ]
steps:
- name: Checkout
@@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- presta-versions: [ '1.7.6.8', '1.6.1.23', '1.7.7.0' ]
+ presta-versions: ['1.6.1.23']
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
diff --git a/controllers/front/return.php b/controllers/front/return.php
index 92677185a..db25c552f 100644
--- a/controllers/front/return.php
+++ b/controllers/front/return.php
@@ -92,6 +92,7 @@ public function initContent()
// any paid payments for this cart?
if (false === $data['mollie_info']) {
+ /* @phpstan-ignore-next-line */
$data['mollie_info'] = $paymentMethodRepo->getPaymentBy('order_id', (int) Order::getOrderByCartId($idCart));
}
if (false === $data['mollie_info']) {
diff --git a/tests/phpstan/phpstan1.7.6.8.neon b/tests/phpstan/phpstan1.7.6.8.neon
deleted file mode 100644
index cc3ef1a37..000000000
--- a/tests/phpstan/phpstan1.7.6.8.neon
+++ /dev/null
@@ -1,3 +0,0 @@
-includes:
- - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon
- - %currentWorkingDirectory%/tests/phpstan/phpstan_base.neon
diff --git a/tests/phpstan/phpstan1.7.7.0.neon b/tests/phpstan/phpstan1.7.7.0.neon
deleted file mode 100644
index 1b40cfe2e..000000000
--- a/tests/phpstan/phpstan1.7.7.0.neon
+++ /dev/null
@@ -1,3 +0,0 @@
-includes:
- - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon
- - %currentWorkingDirectory%/tests/phpstan/phpstan_base.neon
\ No newline at end of file
From 160acacde2e92881f9f95c97873c181cf11f170e Mon Sep 17 00:00:00 2001
From: margud
Date: Wed, 7 Sep 2022 13:23:17 +0300
Subject: [PATCH 2/2] added escape for help block
---
.../admin/_configure/helpers/form/form.tpl | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/views/templates/admin/_configure/helpers/form/form.tpl b/views/templates/admin/_configure/helpers/form/form.tpl
index 9e4da2f9b..c385c9dd3 100644
--- a/views/templates/admin/_configure/helpers/form/form.tpl
+++ b/views/templates/admin/_configure/helpers/form/form.tpl
@@ -137,14 +137,14 @@
{l s='The description to be used for this transaction. These variables are available:' mod='mollie'}
- {'{orderNumber}'},
- {'{storeName}'},
- {'{countryCode}'},
- {'{cart.id}'},
- {'{order.reference}'},
- {'{customer.firstname}'},
- {'{customer.lastname}'},
- {'{customer.company}'}
+ {'{orderNumber}'|escape:'htmlall':'UTF-8'},
+ {'{storeName}'|escape:'htmlall':'UTF-8'},
+ {'{countryCode}'|escape:'htmlall':'UTF-8'},
+ {'{cart.id}'|escape:'htmlall':'UTF-8'},
+ {'{order.reference}'|escape:'htmlall':'UTF-8'},
+ {'{customer.firstname}'|escape:'htmlall':'UTF-8'},
+ {'{customer.lastname}'|escape:'htmlall':'UTF-8'},
+ {'{customer.company}'|escape:'htmlall':'UTF-8'}