From 92db05c2e6d9c7d9080d5cfaf2cbf17734bd6b81 Mon Sep 17 00:00:00 2001 From: khushboos <khushboo.singhvi@adyen.com> Date: Fri, 6 Sep 2024 12:55:43 +0530 Subject: [PATCH 1/9] Testing on ITT ECP-9438 --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index d5f0f1e64..c09b3ae90 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -54,7 +54,7 @@ jobs: - name: Run E2E Tests run: docker-compose -f .github/workflows/templates/docker-compose.playwright.yml run --rm playwright /e2e.sh env: - INTEGRATION_TESTS_BRANCH: develop + INTEGRATION_TESTS_BRANCH: ECP-9438 SHOPWARE_BASE_URL: ${{secrets.SHOPWARE_BASE_URL}} PAYPAL_USERNAME: ${{secrets.PLAYWRIGHT_PAYPAL_USERNAME}} PAYPAL_PASSWORD: ${{secrets.PLAYWRIGHT_PAYPAL_PASSWORD}} From 4daaf255fc6c446c8044e06b5870fff293f09f79 Mon Sep 17 00:00:00 2001 From: khushboos <khushboo.singhvi@adyen.com> Date: Fri, 6 Sep 2024 12:57:15 +0530 Subject: [PATCH 2/9] reverting develop --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index c09b3ae90..d5f0f1e64 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -54,7 +54,7 @@ jobs: - name: Run E2E Tests run: docker-compose -f .github/workflows/templates/docker-compose.playwright.yml run --rm playwright /e2e.sh env: - INTEGRATION_TESTS_BRANCH: ECP-9438 + INTEGRATION_TESTS_BRANCH: develop SHOPWARE_BASE_URL: ${{secrets.SHOPWARE_BASE_URL}} PAYPAL_USERNAME: ${{secrets.PLAYWRIGHT_PAYPAL_USERNAME}} PAYPAL_PASSWORD: ${{secrets.PLAYWRIGHT_PAYPAL_PASSWORD}} From 90e919cd484e4514864738e6f8469a42fdc348c5 Mon Sep 17 00:00:00 2001 From: Khushboo <khushboo.singhvi@adyen.com> Date: Mon, 9 Sep 2024 18:39:41 +0530 Subject: [PATCH 3/9] [ECP-9438] Update test flow to update docker install command. (#543) * Solving E2E pipeline failure * Solving E2E pipeline failure * Testing - by removing "-" in docker command * Update e2e-test.yml removing - from the docker compose command * Update docker-compose.playwright.yml Updating the playwright version --- .github/workflows/e2e-test.yml | 5 +++-- .github/workflows/templates/docker-compose.playwright.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index d5f0f1e64..2299e2e6c 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -1,7 +1,8 @@ + name: E2E Test run-name: Headless E2E tests for Adyen Shopware Plugin -on: +on: pull_request: workflow_dispatch: @@ -52,7 +53,7 @@ jobs: docker exec shopware6 bash -c 'php bin/console adyen:fetch-logos' - name: Run E2E Tests - run: docker-compose -f .github/workflows/templates/docker-compose.playwright.yml run --rm playwright /e2e.sh + run: docker compose -f .github/workflows/templates/docker-compose.playwright.yml run --rm playwright /e2e.sh env: INTEGRATION_TESTS_BRANCH: develop SHOPWARE_BASE_URL: ${{secrets.SHOPWARE_BASE_URL}} diff --git a/.github/workflows/templates/docker-compose.playwright.yml b/.github/workflows/templates/docker-compose.playwright.yml index d83860072..30eefce72 100644 --- a/.github/workflows/templates/docker-compose.playwright.yml +++ b/.github/workflows/templates/docker-compose.playwright.yml @@ -2,7 +2,7 @@ version: '3' services: playwright: - image: mcr.microsoft.com/playwright:focal + image: mcr.microsoft.com/playwright:v1.47.0-focal networks: - localnetwork shm_size: 1gb From e5ccf685d3e0ef3d0341b9ffbd4699fe1350daba Mon Sep 17 00:00:00 2001 From: Khushboo <khushboo.singhvi@adyen.com> Date: Mon, 9 Sep 2024 19:07:27 +0530 Subject: [PATCH 4/9] [ECP-9424]Upgrading Library version to V20.2.0 (#541) * Upgrading Library version to 20.2.0 * Making changes to release asset yml, passing php version * Making changes to release asset yml, passing php version --------- Co-authored-by: Can Demiralp <ecandemiralp@gmail.com> --- .github/workflows/upload-release-asset.yml | 6 ++++++ composer.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload-release-asset.yml b/.github/workflows/upload-release-asset.yml index 22c451449..261a932a4 100644 --- a/.github/workflows/upload-release-asset.yml +++ b/.github/workflows/upload-release-asset.yml @@ -12,6 +12,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2+' # Ensures that PHP 8.2 is used + extensions: mbstring, xml, intl + - name: Prepare release artifact run: .github/workflows/scripts/prepare-release-asset.sh diff --git a/composer.json b/composer.json index df65433ad..356d98a9f 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "shopware/core": "~6.6.0", "shopware/storefront": "~6.6.0", - "adyen/php-api-library": "^17.5.0", + "adyen/php-api-library": "^20.2.0", "adyen/php-webhook-module": "^1", "ext-json": "*" }, From c172372c2891834c19554d90943b44009d71500b Mon Sep 17 00:00:00 2001 From: Can Demiralp <can.demiralp@adyen.com> Date: Mon, 9 Sep 2024 16:10:27 +0200 Subject: [PATCH 5/9] Version bump --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 356d98a9f..b0a45663a 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ } ], "description": "Official Shopware 6 Plugin to connect to Payment Service Provider Adyen", - "version": "4.1.0", + "version": "4.1.1", "type": "shopware-platform-plugin", "license": "MIT", "require": { From 6b0d3d83ec0ae2d4b470e473f118e4d24aec11bb Mon Sep 17 00:00:00 2001 From: Can Demiralp <ecandemiralp@gmail.com> Date: Tue, 10 Sep 2024 15:55:52 +0200 Subject: [PATCH 6/9] Revert changes from c97e33910ecdf00ad2a8fe812c4696590e1647df (#545) Co-authored-by: Can Demiralp <can.demiralp@adyen.com> --- .github/workflows/upload-release-asset.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/upload-release-asset.yml b/.github/workflows/upload-release-asset.yml index 261a932a4..22c451449 100644 --- a/.github/workflows/upload-release-asset.yml +++ b/.github/workflows/upload-release-asset.yml @@ -12,12 +12,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2+' # Ensures that PHP 8.2 is used - extensions: mbstring, xml, intl - - name: Prepare release artifact run: .github/workflows/scripts/prepare-release-asset.sh From 9d5f6388f5d6df0b7c5e3d172c70121c4a101a08 Mon Sep 17 00:00:00 2001 From: Can Demiralp <ecandemiralp@gmail.com> Date: Thu, 12 Sep 2024 08:47:12 +0200 Subject: [PATCH 7/9] [ECP-9458] Update the handlers for the tasks (#546) Co-authored-by: Can Demiralp <can.demiralp@adyen.com> --- src/ScheduledTask/ProcessNotificationsHandler.php | 2 ++ src/ScheduledTask/ScheduleNotificationsHandler.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ScheduledTask/ProcessNotificationsHandler.php b/src/ScheduledTask/ProcessNotificationsHandler.php index 30df31bd0..51cc374ab 100644 --- a/src/ScheduledTask/ProcessNotificationsHandler.php +++ b/src/ScheduledTask/ProcessNotificationsHandler.php @@ -46,7 +46,9 @@ use Shopware\Core\Framework\Context; use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository; use Shopware\Core\Framework\MessageQueue\ScheduledTask\ScheduledTaskHandler; +use Symfony\Component\Messenger\Attribute\AsMessageHandler; +#[AsMessageHandler(handles: ProcessNotifications::class)] class ProcessNotificationsHandler extends ScheduledTaskHandler { use LoggerAwareTrait; diff --git a/src/ScheduledTask/ScheduleNotificationsHandler.php b/src/ScheduledTask/ScheduleNotificationsHandler.php index 253a1527e..988429583 100644 --- a/src/ScheduledTask/ScheduleNotificationsHandler.php +++ b/src/ScheduledTask/ScheduleNotificationsHandler.php @@ -28,7 +28,9 @@ use Psr\Log\LoggerAwareTrait; use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository; use Shopware\Core\Framework\MessageQueue\ScheduledTask\ScheduledTaskHandler; +use Symfony\Component\Messenger\Attribute\AsMessageHandler; +#[AsMessageHandler(handles: ScheduleNotifications::class)] class ScheduleNotificationsHandler extends ScheduledTaskHandler { use LoggerAwareTrait; From 072fa0f6c3e254aedf83155a6afcfb2a77bb2396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Campos?= <angel.campos@adyen.com> Date: Thu, 12 Sep 2024 11:46:23 +0200 Subject: [PATCH 8/9] Create codeql.yml (#534) Co-authored-by: Can Demiralp <ecandemiralp@gmail.com> --- .github/workflows/codeql.yml | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..63ca9d6c6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,95 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "develop", "develop*", "main*" ] + pull_request: + branches: [ "develop", "develop*", "main*" ] + paths-ignore: + - 'src/Resources/public/js/**' + schedule: + - cron: '16 17 * * 2' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: javascript-typescript + build-mode: none + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # âšī¸ Command-line programs to run using the OS shell. + # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From 35c9bb2cb5b93eac9b0c99726f384d850d160c74 Mon Sep 17 00:00:00 2001 From: Khushboo <khushboo.singhvi@adyen.com> Date: Tue, 17 Sep 2024 14:08:01 +0200 Subject: [PATCH 9/9] Making changes to release asset yml, passing php version (#549) --- .github/workflows/upload-release-asset.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/upload-release-asset.yml b/.github/workflows/upload-release-asset.yml index 22c451449..b2111bd86 100644 --- a/.github/workflows/upload-release-asset.yml +++ b/.github/workflows/upload-release-asset.yml @@ -12,6 +12,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2+' + - name: Prepare release artifact run: .github/workflows/scripts/prepare-release-asset.sh