Skip to content

Commit b3bc61f

Browse files
Updated phpstan/phpstan to version 2.x (#132)
Co-authored-by: 李铭昕 <715557344@qq.com>
1 parent 0886af4 commit b3bc61f

4 files changed

Lines changed: 27 additions & 21 deletions

File tree

.github/workflows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ WORKDIR /opt/www
4747
# RUN composer install --no-dev --no-scripts
4848

4949
COPY . /opt/www
50-
RUN print "\n" | composer install -o && php bin/hyperf.php
50+
RUN echo "\n" | composer install -o && php bin/hyperf.php
5151

5252
EXPOSE 9501
5353

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"hyperf/devtool": "~3.2.0",
3232
"hyperf/testing": "~3.2.0",
3333
"mockery/mockery": "^1.0",
34-
"phpstan/phpstan": "^1.0",
34+
"phpstan/phpstan": "^2.0",
3535
"swoole/ide-helper": "^6.0"
3636
},
3737
"suggest": {

config/autoload/cache.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
use Hyperf\Codec\Packer\PhpSerializerPacker;
1414

1515
return [
16-
'default' => [
17-
'driver' => RedisDriver::class,
18-
'packer' => PhpSerializerPacker::class,
19-
'prefix' => 'c:',
20-
'skip_cache_results' => [],
16+
'default' => 'default',
17+
'stores' => [
18+
'default' => [
19+
'driver' => RedisDriver::class,
20+
'packer' => PhpSerializerPacker::class,
21+
'prefix' => 'c:',
22+
'skip_cache_results' => [],
23+
],
2124
],
2225
];

config/autoload/logger.php

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,26 @@
1111
*/
1212
use Monolog\Formatter\LineFormatter;
1313
use Monolog\Handler\StreamHandler;
14-
use Monolog\Logger;
14+
use Monolog\Level;
1515

1616
return [
17-
'default' => [
18-
'handler' => [
19-
'class' => StreamHandler::class,
20-
'constructor' => [
21-
'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
22-
'level' => Monolog\Level::Debug,
17+
'default' => 'default',
18+
'channels' => [
19+
'default' => [
20+
'handler' => [
21+
'class' => StreamHandler::class,
22+
'constructor' => [
23+
'stream' => BASE_PATH . '/runtime/logs/hyperf.log',
24+
'level' => Level::Debug,
25+
],
2326
],
24-
],
25-
'formatter' => [
26-
'class' => LineFormatter::class,
27-
'constructor' => [
28-
'format' => null,
29-
'dateFormat' => 'Y-m-d H:i:s',
30-
'allowInlineLineBreaks' => true,
27+
'formatter' => [
28+
'class' => LineFormatter::class,
29+
'constructor' => [
30+
'format' => null,
31+
'dateFormat' => 'Y-m-d H:i:s',
32+
'allowInlineLineBreaks' => true,
33+
],
3134
],
3235
],
3336
],

0 commit comments

Comments
 (0)