From ce9eb7b564a5b64da864206ecae2708e191a9e83 Mon Sep 17 00:00:00 2001 From: Zlatoslav Desiatnikov Date: Mon, 23 Mar 2026 19:47:36 +0300 Subject: [PATCH 1/3] feat: laravel 13 support - add webmozart/assert ^2.0 support - drop laravel 9 and 10 support - drop php 8.1 support - add php 8.5 workflows --- .github/workflows/continuous-integration.yml | 12 ++++++------ composer.json | 16 +++++++++------- psalm.xml | 6 ++++++ src/ScheduledCollector/SchedulableCollector.php | 3 +++ .../SchedulableCollectorRegistry.php | 3 +++ 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9dc88c3..c817517 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] steps: - uses: actions/checkout@v3.3.0 - uses: shivammathur/setup-php@v2 @@ -46,7 +46,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] steps: - uses: actions/checkout@v3.3.0 - uses: shivammathur/setup-php@v2 @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] steps: - uses: actions/checkout@v3.3.0 - uses: shivammathur/setup-php@v2 @@ -80,7 +80,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] steps: - uses: actions/checkout@v3.3.0 - uses: shivammathur/setup-php@v2 @@ -97,7 +97,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] steps: - uses: actions/checkout@v3.3.0 - uses: shivammathur/setup-php@v2 @@ -115,7 +115,7 @@ jobs: strategy: matrix: - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3, 8.4, 8.5] steps: - uses: actions/checkout@v3.3.0 diff --git a/composer.json b/composer.json index 728144f..2c03600 100644 --- a/composer.json +++ b/composer.json @@ -10,28 +10,29 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-redis": "*", - "laravel/framework": "^9.0 || ^10.0 || ^11.0 || ^12.0", - "webmozart/assert": "^1.11", + "laravel/framework": "^11.0 || ^12.0 || ^13.0", + "webmozart/assert": "^1.11 || ^2.0", "zlodes/prometheus-client": "^2.0.4" }, "require-dev": { "ergebnis/composer-normalize": "dev-main", "mockery/mockery": "^1.5", - "orchestra/testbench": "^8.5 || ^9.0 || ^10.0", + "orchestra/testbench": "^8.5 || ^9.0 || ^10.0 || ^11.0", "phpbench/phpbench": "^1.4", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.13", "phpstan/extension-installer": "^1.3", "phpstan/phpstan": "^1.10", "phpstan/phpstan-webmozart-assert": "^1.2", - "phpunit/phpunit": "^10.0 || ^11.0", - "psalm/plugin-laravel": "^2.8 || ^3.0", + "phpunit/phpunit": "^10.0 || ^11.0 || ^12.0", + "psalm/plugin-laravel": "^3.0 || ^4.0", "roave/security-advisories": "dev-latest", + "savinmikhail/dist-size-optimizer": "^0.2.7", "slevomat/coding-standard": "^8.11", "squizlabs/php_codesniffer": "^3.7", - "vimeo/psalm": "^5.0 || ^6.9.6" + "vimeo/psalm": "^5.0 || ^6.9.6 || ^7.0" }, "minimum-stability": "beta", "autoload": { @@ -50,6 +51,7 @@ "ergebnis/composer-normalize": true, "phpstan/extension-installer": true }, + "lock": false, "sort-packages": true }, "extra": { diff --git a/psalm.xml b/psalm.xml index 5b03b04..5c903b8 100644 --- a/psalm.xml +++ b/psalm.xml @@ -17,6 +17,12 @@ + + + + + + diff --git a/src/ScheduledCollector/SchedulableCollector.php b/src/ScheduledCollector/SchedulableCollector.php index 9714c8b..2768af5 100644 --- a/src/ScheduledCollector/SchedulableCollector.php +++ b/src/ScheduledCollector/SchedulableCollector.php @@ -6,6 +6,9 @@ use Zlodes\PrometheusClient\Laravel\Exception\CannotCollectScheduledMetrics; +/** + * @psalm-immutable + */ interface SchedulableCollector { /** diff --git a/src/ScheduledCollector/SchedulableCollectorRegistry.php b/src/ScheduledCollector/SchedulableCollectorRegistry.php index 6539692..d85d372 100644 --- a/src/ScheduledCollector/SchedulableCollectorRegistry.php +++ b/src/ScheduledCollector/SchedulableCollectorRegistry.php @@ -4,6 +4,9 @@ namespace Zlodes\PrometheusClient\Laravel\ScheduledCollector; +/** + * @psalm-mutable + */ interface SchedulableCollectorRegistry { /** From f7d3c8ea787f330650aa02c73e04af429e7777cb Mon Sep 17 00:00:00 2001 From: Zlatoslav Desiatnikov Date: Mon, 23 Mar 2026 19:48:32 +0300 Subject: [PATCH 2/3] chore: rollback psalm annotations --- src/ScheduledCollector/SchedulableCollector.php | 3 --- src/ScheduledCollector/SchedulableCollectorRegistry.php | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/ScheduledCollector/SchedulableCollector.php b/src/ScheduledCollector/SchedulableCollector.php index 2768af5..9714c8b 100644 --- a/src/ScheduledCollector/SchedulableCollector.php +++ b/src/ScheduledCollector/SchedulableCollector.php @@ -6,9 +6,6 @@ use Zlodes\PrometheusClient\Laravel\Exception\CannotCollectScheduledMetrics; -/** - * @psalm-immutable - */ interface SchedulableCollector { /** diff --git a/src/ScheduledCollector/SchedulableCollectorRegistry.php b/src/ScheduledCollector/SchedulableCollectorRegistry.php index d85d372..6539692 100644 --- a/src/ScheduledCollector/SchedulableCollectorRegistry.php +++ b/src/ScheduledCollector/SchedulableCollectorRegistry.php @@ -4,9 +4,6 @@ namespace Zlodes\PrometheusClient\Laravel\ScheduledCollector; -/** - * @psalm-mutable - */ interface SchedulableCollectorRegistry { /** From 8321b7aee44cb9a81266cc79130bcc2d014ef651 Mon Sep 17 00:00:00 2001 From: Zlatoslav Desiatnikov Date: Mon, 23 Mar 2026 19:50:34 +0300 Subject: [PATCH 3/3] chore: add psalm ignore Signed-off-by: Zlatoslav Desiatnikov --- psalm.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/psalm.xml b/psalm.xml index 5c903b8..74969ba 100644 --- a/psalm.xml +++ b/psalm.xml @@ -20,6 +20,7 @@ +