Skip to content

Commit 91f7e89

Browse files
committed
drop Laravel 8 / PHP 8.0 support
integrated Pint for PHP style fixing
1 parent ec8b89a commit 91f7e89

File tree

8 files changed

+37
-14
lines changed

8 files changed

+37
-14
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/.phpunit.result.cache
21
/vendor/
32
/.idea
43
/composer.lock
54
/tests/_coverage
5+
.phpunit.result.cache
6+
.pint.cache.json

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [v1.0.x (Unreleased)](https://github.com/onlime/laravel-http-client-global-logger/compare/v1.0.0...main)
44

5+
- Drop Laravel 8 / PHP 8.0 support
6+
- Integrated `laravel/pint` as dev requirement for PHP style fixing
7+
58
## [v1.0.0 (2022-02-10)](https://github.com/onlime/laravel-http-client-global-logger/compare/v0.9.1...v1.0.0)
69

710
- Support Laravel 9

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
}
2727
],
2828
"require": {
29-
"php": "^8.0",
30-
"guzzlehttp/guzzle": "^7.3",
31-
"illuminate/http": "^8.0|^9.0",
32-
"illuminate/support": "^8.0|^9.0",
29+
"php": "^8.1",
30+
"guzzlehttp/guzzle": "^7.5",
31+
"illuminate/http": "^9.0",
32+
"illuminate/support": "^9.0",
3333
"monolog/monolog": "^2.0"
3434
},
3535
"require-dev": {
36-
"laravel/framework": "^8.0|^9.0"
36+
"laravel/framework": "^9.0",
37+
"laravel/pint": "^1.2"
3738
},
3839
"autoload": {
3940
"psr-4": {

config/http-client-global-logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@
106106
'HTTP_CLIENT_GLOBAL_LOGGER_OBFUSCATE_BODY_KEYS',
107107
'pass,password,token,apikey'
108108
)),
109-
]
109+
],
110110
];

pint.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"preset": "laravel",
3+
"rules": {
4+
"braces": false,
5+
"blank_line_before_statement": false,
6+
"class_definition": false,
7+
"binary_operator_spaces": false,
8+
"concat_space": false,
9+
"no_unused_imports": false,
10+
"Laravel/laravel_phpdoc_alignment": false,
11+
"Laravel/laravel_phpdoc_separation": false,
12+
"modernize_strpos": true
13+
},
14+
"exclude": [
15+
"node_modules"
16+
],
17+
"cache-file": ".pint.cache.json"
18+
}

src/Mixins/PendingRequestMixin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function log()
1818
* @return $this
1919
*/
2020
return function (string $name = null) {
21-
if (!config('http-client-global-logger.enabled')) {
21+
if (! config('http-client-global-logger.enabled')) {
2222
return $this;
2323
}
2424

@@ -30,7 +30,7 @@ public function log()
3030

3131
/** @var Logger $logger */
3232
$logger = Log::channel(config('http-client-global-logger.channel'));
33-
if (!is_null($name)) {
33+
if (! is_null($name)) {
3434
$logger = $logger->withName($name);
3535
}
3636
foreach ($messageFormats as $format) {

src/Providers/EventServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace Onlime\LaravelHttpClientGlobalLogger\Providers;
44

5-
use Onlime\LaravelHttpClientGlobalLogger\Listeners\LogRequestSending;
6-
use Onlime\LaravelHttpClientGlobalLogger\Listeners\LogResponseReceived;
75
use Illuminate\Foundation\Support\Providers\EventServiceProvider as BaseEventServiceProvider;
86
use Illuminate\Http\Client\Events\RequestSending;
97
use Illuminate\Http\Client\Events\ResponseReceived;
8+
use Onlime\LaravelHttpClientGlobalLogger\Listeners\LogRequestSending;
9+
use Onlime\LaravelHttpClientGlobalLogger\Listeners\LogResponseReceived;
1010

1111
class EventServiceProvider extends BaseEventServiceProvider
1212
{

src/Providers/ServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace Onlime\LaravelHttpClientGlobalLogger\Providers;
44

55
use Illuminate\Http\Client\PendingRequest;
6-
use Monolog\Handler\StreamHandler;
76
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
7+
use Monolog\Handler\StreamHandler;
88
use Onlime\LaravelHttpClientGlobalLogger\Mixins\PendingRequestMixin;
99

1010
class ServiceProvider extends BaseServiceProvider
@@ -17,7 +17,7 @@ public function register()
1717
$this->mergeConfigFrom($this->configFileLocation(), 'http-client-global-logger');
1818

1919
if (config('http-client-global-logger.enabled') &&
20-
!config('http-client-global-logger.mixin')) {
20+
! config('http-client-global-logger.mixin')) {
2121
$this->app->register(EventServiceProvider::class);
2222
}
2323
}
@@ -29,7 +29,7 @@ public function boot()
2929
], 'config');
3030

3131
$channel = config('http-client-global-logger.channel');
32-
if (!array_key_exists($channel, config('logging.channels'))) {
32+
if (! array_key_exists($channel, config('logging.channels'))) {
3333
// Define new logging channel
3434
// see https://stackoverflow.com/a/59791539/5982842
3535
$this->app->make('config')->set("logging.channels.$channel", [

0 commit comments

Comments
 (0)