From 5b1eabe25fbcd6452c500b1e97881b72ce8e61ea Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Mon, 30 May 2022 14:31:47 +0200 Subject: [PATCH] Support laminas-cache:3, drop laminas-cache:2 (#35) --- .github/workflows/integrate.yaml | 10 +++++----- Makefile | 2 +- composer.json | 13 +++++++------ phpstan-baseline.neon | 11 ----------- tests/Type/Laminas/ServiceManagerLoaderTest.php | 2 -- 5 files changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index a2f14ef..a7e22ad 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -72,11 +72,11 @@ jobs: - name: "Install lowest dependencies" if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --no-interaction --no-progress --ignore-platform-reqs --prefer-lowest" + run: "composer update --no-interaction --no-progress --prefer-lowest" - name: "Install highest dependencies" if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress --ignore-platform-reqs" + run: "composer update --no-interaction --no-progress" - name: "Run tests" timeout-minutes: 5 @@ -115,7 +115,7 @@ jobs: restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- - name: "Install dependencies" - run: "composer update --no-interaction --no-progress --ignore-platform-reqs" + run: "composer update --no-interaction --no-progress" - name: "Run tests" timeout-minutes: 3 @@ -160,7 +160,7 @@ jobs: restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- - name: "Install dependencies" - run: "composer update --no-interaction --no-progress --ignore-platform-reqs" + run: "composer update --no-interaction --no-progress" - name: "Check coding standards" run: "vendor/bin/php-cs-fixer fix --verbose --dry-run --diff" @@ -198,7 +198,7 @@ jobs: restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer- - name: "Install dependencies" - run: "composer update --no-interaction --no-progress --ignore-platform-reqs" + run: "composer update --no-interaction --no-progress" - name: "Run static analysis" run: "vendor/bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr" diff --git a/Makefile b/Makefile index 188958f..5177ae7 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: csfix static-analysis test @echo "Done." vendor: composer.json - composer update --ignore-platform-reqs + composer update touch vendor .PHONY: csfix diff --git a/composer.json b/composer.json index 14663f7..a749f64 100644 --- a/composer.json +++ b/composer.json @@ -18,30 +18,31 @@ } ], "require": { - "php": ">=8.0", - "phpstan/phpstan": "^1.5.6" + "php": "~8.0.0 || ~8.1.0", + "phpstan/phpstan": "^1.7.3" }, "require-dev": { - "laminas/laminas-cache": "^2.13.2", + "laminas/laminas-cache": "^3.1.3", + "laminas/laminas-cache-storage-adapter-memory": "^2.0.0", "laminas/laminas-filter": "^2.14.0", "laminas/laminas-form": "^3.1.1", "laminas/laminas-hydrator": "^4.3.1", "laminas/laminas-i18n": "^2.15.0", "laminas/laminas-inputfilter": "^2.13.0", - "laminas/laminas-log": "^2.15.0", + "laminas/laminas-log": "^2.15.1", "laminas/laminas-mail": "^2.16.0", "laminas/laminas-mvc": "^3.3.3", "laminas/laminas-paginator": "^2.12.2", "laminas/laminas-validator": "^2.17.0", "malukenho/mcbumpface": "^1.1.5", "phpstan/phpstan-deprecation-rules": "^1.0.0", - "phpstan/phpstan-phpunit": "^1.1.0", + "phpstan/phpstan-phpunit": "^1.1.1", "phpunit/phpunit": "^9.5.20", "slam/php-cs-fixer-extensions": "^v3.1.0", "slam/php-debug-r": "^v1.7.0" }, "conflict": { - "laminas/laminas-cache": "<2.13", + "laminas/laminas-cache": "<3.1", "laminas/laminas-filter": "<2.14", "laminas/laminas-form": "<3.1", "laminas/laminas-hydrator": "<4.3", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4b322ee..6eb6b60 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -4,14 +4,3 @@ parameters: message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'LaminasPhpStan\\\\\\\\TestAsset\\\\\\\\BarService' and Laminas\\\\Stdlib\\\\DispatchableInterface will always evaluate to false\\.$#" count: 1 path: tests/Type/Laminas/ServiceManagerLoaderTest.php - - - - message: - """ - #^Fetching class constant class of deprecated class Laminas\\\\Cache\\\\PatternPluginManager\\: - This will be removed in v3\\.0\\.0\\. Cache pattern will require dependency injection and thus, a generic - plugin manager makes no sense anymore\\.$# - """ - count: 1 - path: tests/Type/Laminas/ServiceManagerLoaderTest.php - diff --git a/tests/Type/Laminas/ServiceManagerLoaderTest.php b/tests/Type/Laminas/ServiceManagerLoaderTest.php index 478215e..5447a41 100644 --- a/tests/Type/Laminas/ServiceManagerLoaderTest.php +++ b/tests/Type/Laminas/ServiceManagerLoaderTest.php @@ -4,7 +4,6 @@ namespace LaminasPhpStan\Tests\Type\Laminas; -use Laminas\Cache\PatternPluginManager as CachePatternPluginManager; use Laminas\Cache\Storage\AdapterPluginManager as CacheStorageAdapterPluginManager; use Laminas\Cache\Storage\PluginManager as CacheStoragePluginManager; use Laminas\Config\ReaderPluginManager as ConfigReaderPluginManager; @@ -60,7 +59,6 @@ public function testGetSubserviceDependingOnCallOnTypeGiven(): void { $serviceManagerLoader = new ServiceManagerLoader(null); $knownPluginManagers = [ - CachePatternPluginManager::class, CacheStorageAdapterPluginManager::class, CacheStoragePluginManager::class, // ConfigReaderPluginManager::class,