Skip to content

Commit 4a843f3

Browse files
committed
update psr log and remove wshafer log dependency
1 parent 21bc98f commit 4a843f3

File tree

10 files changed

+31
-52
lines changed

10 files changed

+31
-52
lines changed

.github/workflows/coding-standards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- "1.x.x"
9+
- "2.x.x"
1010

1111
jobs:
1212
coding-standards:
@@ -19,8 +19,8 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
23-
- "8.0"
22+
- "8.1"
23+
- "8.2"
2424
operating-system:
2525
- "ubuntu-latest"
2626

.github/workflows/mutation-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- "1.x.x"
9+
- "2.x.x"
1010

1111
jobs:
1212
mutation-tests:
@@ -19,8 +19,8 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
23-
- "8.0"
22+
- "8.1"
23+
- "8.2"
2424
operating-system:
2525
- "ubuntu-latest"
2626

.github/workflows/phpstan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- "1.x.x"
9+
- "2.x.x"
1010

1111
jobs:
1212
static-analysis-phpstan:
@@ -19,8 +19,8 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
23-
- "8.0"
22+
- "8.1"
23+
- "8.2"
2424
operating-system:
2525
- "ubuntu-latest"
2626

.github/workflows/phpunit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- "1.x.x"
9+
- "2.x.x"
1010

1111
jobs:
1212
phpunit:
@@ -19,8 +19,8 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
23-
- "8.0"
22+
- "8.1"
23+
- "8.2"
2424
operating-system:
2525
- "ubuntu-latest"
2626

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.phpunit.result.cache
22
/composer.lock
33
/coverage
4+
/infection.log
45
/vendor

composer.json

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,18 @@
1212
"name": "kpicaza"
1313
}
1414
],
15-
"repositories": [
16-
{
17-
"type": "git",
18-
"url": "https://github.com/antidot-framework/psr11-monolog"
19-
}
20-
],
2115
"require": {
22-
"php": "^7.4.0|^8.0",
16+
"php": "~8.1.0 || ~8.2.0",
2317
"psr/http-server-middleware": "^1.0",
24-
"psr/log": "^1.1"
18+
"psr/log": "^3.0"
2519
},
2620
"require-dev": {
21+
"icanhazstring/composer-unused": "^0.8.9",
22+
"infection/infection": "^0.27",
2723
"phpro/grumphp": "~0.17 || ~1.0",
28-
"infection/infection": "^0.21.0",
29-
"phpstan/phpstan": "^0.12.0",
24+
"phpstan/phpstan": "^1.10",
3025
"phpunit/phpunit": "^8.0 || ^9.0",
31-
"squizlabs/php_codesniffer": "^3.4",
32-
"wshafer/psr11-monolog": "@dev"
26+
"squizlabs/php_codesniffer": "^3.4"
3327
},
3428
"autoload": {
3529
"psr-4": {
@@ -44,6 +38,7 @@
4438
"scripts": {
4539
"check-all": [
4640
"@test",
41+
"@unused",
4742
"@cs-check",
4843
"@inspect",
4944
"@infection"
@@ -52,17 +47,19 @@
5247
"cs-fix": "phpcbf src --colors",
5348
"inspect": "phpstan analyse src -l7 --ansi",
5449
"test": "phpunit --colors=always",
55-
"infection": "XDEBUG_MODE=coverage infection"
50+
"infection": "XDEBUG_MODE=coverage infection",
51+
"unused": "composer-unused"
5652
},
5753
"config": {
58-
"sort-packages": true
54+
"sort-packages": true,
55+
"allow-plugins": {
56+
"infection/extension-installer": true,
57+
"phpro/grumphp": true
58+
}
5959
},
6060
"extra": {
6161
"zf": {
6262
"config-provider": "Antidot\\Logger\\Container\\Config\\ConfigProvider"
6363
}
64-
},
65-
"suggest": {
66-
"wshafer/psr11-monolog": "Allow using middleware with monolog implementation using MonologFactory class"
6764
}
6865
}

infection.json.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"src"
55
]
66
},
7+
"logs": {
8+
"text": "infection.log"
9+
},
710
"mutators": {
811
"@default": true
912
}

src/Application/Http/Middleware/RequestLoggerMiddleware.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
3535

3636
$this->logger->debug(
3737
$message
38-
? $message
39-
: sprintf(self::UNEXPECTED_REQUEST_MESSAGE, get_class($request))
38+
?: sprintf(self::UNEXPECTED_REQUEST_MESSAGE, get_class($request))
4039
);
4140

4241
return $handler->handle($request);

src/Container/Config/ConfigProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ public function __invoke(): array
2121
RequestLoggerMiddleware::class => RequestLoggerMiddleware::class,
2222
ExceptionLoggerMiddleware::class => ExceptionLoggerMiddleware::class,
2323
],
24-
'factories' => [
25-
LoggerInterface::class => MonologFactory::class,
26-
],
2724
];
2825
}
2926
}

src/Container/MonologFactory.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)