Skip to content

Commit fe22f70

Browse files
committed
Update github actions and dependencies
1 parent 975fc66 commit fe22f70

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ jobs:
1010
runs-on: ubuntu-20.04
1111
strategy:
1212
matrix:
13-
php: ['8.1']
13+
php: ['8.1', '8.2']
1414
stability: [prefer-lowest, prefer-stable]
15-
include:
16-
- php: '8.2'
17-
flags: "--ignore-platform-req=php"
18-
phpunit-flags: '--no-coverage'
19-
stability: prefer-stable
2015
steps:
2116
- name: Checkout code
22-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
2318

2419
- name: Setup PHP
2520
uses: shivammathur/setup-php@v2
@@ -36,8 +31,8 @@ jobs:
3631
- name: Get Composer Cache Directory
3732
id: composer-cache
3833
run: |
39-
echo "::set-output name=dir::$(composer config cache-files-dir)"
40-
- uses: actions/cache@v2
34+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
35+
- uses: actions/cache@v3
4136
with:
4237
path: ${{ steps.composer-cache.outputs.dir }}
4338
key: ${{ runner.os }}-composer-${{ matrix.stability }}-${{ matrix.flags }}-${{ hashFiles('**/composer.lock') }}
@@ -53,7 +48,7 @@ jobs:
5348

5449
- name: Run static analysis
5550
run: composer phpstan
56-
if: ${{ matrix.php == '8.1' && matrix.stability == 'prefer-stable'}}
51+
if: ${{ matrix.php == '8.2' && matrix.stability == 'prefer-stable'}}
5752

5853
- name: Run Coding style rules
5954
run: composer phpcs:fix

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
"ext-json": "*"
4747
},
4848
"require-dev": {
49-
"friendsofphp/php-cs-fixer": "^v3.8.0",
49+
"friendsofphp/php-cs-fixer": "^v3.13.2",
5050
"guzzlehttp/guzzle": "^7.5",
5151
"guzzlehttp/psr7": "^1.6 || ^2.4.3",
52-
"phpstan/phpstan": "^1.9",
53-
"phpstan/phpstan-phpunit": "^1.2.2",
52+
"phpstan/phpstan": "^1.9.6",
53+
"phpstan/phpstan-phpunit": "^1.3.3",
5454
"phpstan/phpstan-strict-rules": "^1.4.4",
55-
"phpunit/phpunit": "^9.5.26",
55+
"phpunit/phpunit": "^9.5.27",
5656
"psr/http-factory": "^1.0.1",
5757
"psr/simple-cache": "^1.0.1",
5858
"symfony/cache": "^v5.0.0 || ^v6.0.0"
@@ -69,14 +69,14 @@
6969
}
7070
},
7171
"scripts": {
72-
"phpcs": "php-cs-fixer fix -vvv --diff --dry-run --allow-risky=yes --ansi",
72+
"phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix -vvv --diff --dry-run --allow-risky=yes --ansi",
7373
"phpcs:fix": "php-cs-fixer fix -vvv --allow-risky=yes --ansi",
74-
"phpstan": "phpstan analyse -l max -c phpstan.neon src --memory-limit=256M --ansi",
74+
"phpstan": "phpstan analyse -l max -c phpstan.neon src --xdebug --memory-limit=256M --ansi",
7575
"phpunit": "XDEBUG_MODE=coverage phpunit --coverage-text",
7676
"test": [
7777
"@phpunit",
7878
"@phpstan",
79-
"@phpcs:fix"
79+
"@phpcs"
8080
]
8181
},
8282
"scripts-descriptions": {

src/Storage/TimeToLive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function fromDurationString(string $duration): DateInterval
2222
set_error_handler(fn () => true);
2323
$interval = DateInterval::createFromDateString($duration);
2424
restore_error_handler();
25-
if (!$interval instanceof DateInterval) { /* @phpstan-ignore-line */
25+
if (!$interval instanceof DateInterval) {
2626
throw new InvalidArgumentException(
2727
'The ttl value "'.$duration.'" can not be parsable by `DateInterval::createFromDateString`.'
2828
);

0 commit comments

Comments
 (0)