From 5902505e6abc623a2ef04a052374e2e2aaced1cd Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Mon, 27 Jan 2025 15:41:58 +0100 Subject: [PATCH 1/2] fix static analysis --- .github/workflows/static-analysis.yml | 73 +-------------------------- 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index fff516ca..cc70aac4 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,19 +1,4 @@ -name: "Static Analysis" - -on: - pull_request: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - -jobs: - static-analysis-phpstan: - name: "Static Analysis with PHPStan" - runs-on: "ubuntu-20.04"name: "Static analysis centralised" +name: "Static analysis centralised" on: schedule: @@ -107,58 +92,4 @@ jobs: COMPOSER_OPTIONS: ${{ matrix.matrix.composer_options }} secrets: SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} - COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} - continue-on-error: ${{ matrix.experimental }} - strategy: - matrix: - include: - - { php-version: "8.1", dependencies: "lowest", experimental: false } - - { php-version: "8.2", dependencies: "highest", experimental: false } - - { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev as 11.3.9", experimental: true } - steps: - - name: "Checkout code" - uses: "actions/checkout@v4" - - - name: "Install PHP" - uses: shivammathur/setup-php@v2 - with: - coverage: "none" - php-version: "${{ matrix.php-version }}" - - - name: "Setup Pimcore environment" - env: - DEPENDENCIES: "${{ matrix.dependencies }}" - run: | - .github/ci/scripts/setup-environment.sh - - - name: "Update Pimcore version" - env: - PIMCORE_VERSION: "${{ matrix.pimcore_version }}" - run: | - if [ ! -z "$PIMCORE_VERSION" ]; then - composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" - fi - - - name: "Install dependencies with Composer" - uses: ramsey/composer-install@v3 - with: - dependency-versions: "${{ matrix.dependencies }}" - - - name: "Run a static analysis with phpstan/phpstan (highest)" - if: ${{ matrix.dependencies == 'highest' }} - run: "vendor/bin/phpstan analyse --memory-limit=-1" - - - name: "Run a static analysis with phpstan/phpstan (lowest)" - if: ${{ matrix.dependencies == 'lowest' }} - run: "vendor/bin/phpstan analyse --memory-limit=-1 -c phpstan-lowest.neon" - - - name: "Generate baseline file" - if: ${{ failure() }} - run: "vendor/bin/phpstan analyse --memory-limit=-1 --generate-baseline" - - - name: "Upload baseline file" - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: phpstan-baseline.neon - path: phpstan-baseline.neon + COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} \ No newline at end of file From 68feb938f5c4ae0901484a9a1076703781f5199c Mon Sep 17 00:00:00 2001 From: Alex Zamponi <562324+alexz707@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:36:35 +0100 Subject: [PATCH 2/2] fix deprecation --- doc/02_Installation/01_Update.md | 5 +++++ src/Newsletter/Queue/Item/DefaultNewsletterQueueItem.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/02_Installation/01_Update.md b/doc/02_Installation/01_Update.md index 7f791a83..274e4b7f 100644 --- a/doc/02_Installation/01_Update.md +++ b/doc/02_Installation/01_Update.md @@ -1,5 +1,10 @@ # Update Notices +## Update to Version 5.0 +- CustomerManagementFrameworkBundle\Newsletter\Queue\Item\/DefaultNewsletterQueueItem constructor removed default null value from $customer parameter. +- + + ## Update to Version 4.1.2 - CSS includes using the `pimcore_head_link` view helper are not within a deferred block anymore. If you extend the CMF `layout.html.twig` template in your custom code and embed additional CSS within your templates via the `pimcore_head_link` twig extension, check if they still are embedded correctly. diff --git a/src/Newsletter/Queue/Item/DefaultNewsletterQueueItem.php b/src/Newsletter/Queue/Item/DefaultNewsletterQueueItem.php index a5d7e224..74568955 100644 --- a/src/Newsletter/Queue/Item/DefaultNewsletterQueueItem.php +++ b/src/Newsletter/Queue/Item/DefaultNewsletterQueueItem.php @@ -58,7 +58,7 @@ class DefaultNewsletterQueueItem implements NewsletterQueueItemInterface */ private $successfullyProcessed = false; - public function __construct($customerId, ?CustomerInterface $customer = null, $email, $operation, $modificationDate = null) + public function __construct($customerId, ?CustomerInterface $customer, $email, $operation, $modificationDate = null) { $modificationDate = !is_null($modificationDate) ? $modificationDate : round(microtime(true) * 1000);