Skip to content

Commit 2e31b73

Browse files
committed
Use prefer lowest and prefer stable for checks, fixed phpstan
1 parent a195a2b commit 2e31b73

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

.github/workflows/analyse.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
name: analyse
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
php: [8.2, 8.3]
16+
stability: [prefer-lowest, prefer-stable]
17+
18+
name: PHPStan - P${{ matrix.php }} - ${{ matrix.stability }}
1319

1420
steps:
1521
- name: Checkout code
@@ -18,12 +24,12 @@ jobs:
1824
- name: Setup PHP
1925
uses: shivammathur/setup-php@v2
2026
with:
21-
php-version: 8.2
27+
php-version: ${{ matrix.php }}
2228
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
2329
coverage: none
2430

2531
- name: Install dependencies
26-
run: composer install --no-interaction
32+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
2733

2834
- name: Analyse
2935
run: composer run analyse

.github/workflows/php.yml renamed to .github/workflows/phpcs.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
name: PHPCS
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
php: [8.2, 8.3]
16+
stability: [prefer-lowest, prefer-stable]
17+
18+
name: PHPCS - P${{ matrix.php }} - ${{ matrix.stability }}
1319

1420
steps:
1521
- name: Checkout code
@@ -18,12 +24,12 @@ jobs:
1824
- name: Setup PHP
1925
uses: shivammathur/setup-php@v2
2026
with:
21-
php-version: 8.2
27+
php-version: ${{ matrix.php }}
2228
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
2329
coverage: none
2430

2531
- name: Install dependencies
26-
run: composer install --no-interaction
32+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
2733

2834
- name: Analyse
2935
run: composer run phpcs

Plugin/MonologPlugin.php

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use JustBetter\Sentry\Logger\Handler\Sentry;
66
use Magento\Framework\Logger\Monolog;
7+
use Monolog\LogRecord;
8+
use Monolog\Processor\ProcessorInterface;
79

810
class MonologPlugin extends Monolog
911
{
@@ -14,6 +16,8 @@ class MonologPlugin extends Monolog
1416
* @param Sentry $sentryHandler
1517
* @param \Monolog\Handler\HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc.
1618
* @param callable[] $processors Optional array of processors
19+
*
20+
* @phpstan-param array<(callable(LogRecord|array): LogRecord|array)|ProcessorInterface> $processors
1721
*/
1822
public function __construct(
1923
$name,

0 commit comments

Comments
 (0)