Skip to content

Commit 11c3ced

Browse files
authored
fix static analysis (#554)
* fix static analysis * fix deprecation
1 parent c02cb5d commit 11c3ced

File tree

3 files changed

+8
-72
lines changed

3 files changed

+8
-72
lines changed

.github/workflows/static-analysis.yml

+2-71
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
name: "Static Analysis"
2-
3-
on:
4-
pull_request:
5-
branches:
6-
- "[0-9]+.[0-9]+"
7-
- "[0-9]+.x"
8-
push:
9-
branches:
10-
- "[0-9]+.[0-9]+"
11-
- "[0-9]+.x"
12-
13-
jobs:
14-
static-analysis-phpstan:
15-
name: "Static Analysis with PHPStan"
16-
runs-on: "ubuntu-20.04"name: "Static analysis centralised"
1+
name: "Static analysis centralised"
172

183
on:
194
schedule:
@@ -107,58 +92,4 @@ jobs:
10792
COMPOSER_OPTIONS: ${{ matrix.matrix.composer_options }}
10893
secrets:
10994
SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }}
110-
COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }}
111-
continue-on-error: ${{ matrix.experimental }}
112-
strategy:
113-
matrix:
114-
include:
115-
- { php-version: "8.1", dependencies: "lowest", experimental: false }
116-
- { php-version: "8.2", dependencies: "highest", experimental: false }
117-
- { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev as 11.3.9", experimental: true }
118-
steps:
119-
- name: "Checkout code"
120-
uses: "actions/checkout@v4"
121-
122-
- name: "Install PHP"
123-
uses: shivammathur/setup-php@v2
124-
with:
125-
coverage: "none"
126-
php-version: "${{ matrix.php-version }}"
127-
128-
- name: "Setup Pimcore environment"
129-
env:
130-
DEPENDENCIES: "${{ matrix.dependencies }}"
131-
run: |
132-
.github/ci/scripts/setup-environment.sh
133-
134-
- name: "Update Pimcore version"
135-
env:
136-
PIMCORE_VERSION: "${{ matrix.pimcore_version }}"
137-
run: |
138-
if [ ! -z "$PIMCORE_VERSION" ]; then
139-
composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}"
140-
fi
141-
142-
- name: "Install dependencies with Composer"
143-
uses: ramsey/composer-install@v3
144-
with:
145-
dependency-versions: "${{ matrix.dependencies }}"
146-
147-
- name: "Run a static analysis with phpstan/phpstan (highest)"
148-
if: ${{ matrix.dependencies == 'highest' }}
149-
run: "vendor/bin/phpstan analyse --memory-limit=-1"
150-
151-
- name: "Run a static analysis with phpstan/phpstan (lowest)"
152-
if: ${{ matrix.dependencies == 'lowest' }}
153-
run: "vendor/bin/phpstan analyse --memory-limit=-1 -c phpstan-lowest.neon"
154-
155-
- name: "Generate baseline file"
156-
if: ${{ failure() }}
157-
run: "vendor/bin/phpstan analyse --memory-limit=-1 --generate-baseline"
158-
159-
- name: "Upload baseline file"
160-
if: ${{ failure() }}
161-
uses: actions/upload-artifact@v4
162-
with:
163-
name: phpstan-baseline.neon
164-
path: phpstan-baseline.neon
95+
COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }}

doc/02_Installation/01_Update.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Update Notices
22

3+
## Update to Version 5.0
4+
- CustomerManagementFrameworkBundle\Newsletter\Queue\Item\/DefaultNewsletterQueueItem constructor removed default null value from $customer parameter.
5+
-
6+
7+
38
## Update to Version 4.1.2
49
- 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.
510

src/Newsletter/Queue/Item/DefaultNewsletterQueueItem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class DefaultNewsletterQueueItem implements NewsletterQueueItemInterface
5858
*/
5959
private $successfullyProcessed = false;
6060

61-
public function __construct($customerId, ?CustomerInterface $customer = null, $email, $operation, $modificationDate = null)
61+
public function __construct($customerId, ?CustomerInterface $customer, $email, $operation, $modificationDate = null)
6262
{
6363
$modificationDate = !is_null($modificationDate) ? $modificationDate : round(microtime(true) * 1000);
6464

0 commit comments

Comments
 (0)