Skip to content

Commit

Permalink
Support laminas-cache:3, drop laminas-cache:2 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk authored May 30, 2022
1 parent f8ba97d commit 5b1eabe
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 0 additions & 11 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 0 additions & 2 deletions tests/Type/Laminas/ServiceManagerLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,7 +59,6 @@ public function testGetSubserviceDependingOnCallOnTypeGiven(): void
{
$serviceManagerLoader = new ServiceManagerLoader(null);
$knownPluginManagers = [
CachePatternPluginManager::class,
CacheStorageAdapterPluginManager::class,
CacheStoragePluginManager::class,
// ConfigReaderPluginManager::class,
Expand Down

0 comments on commit 5b1eabe

Please sign in to comment.