File tree Expand file tree Collapse file tree 3 files changed +10
-14
lines changed Expand file tree Collapse file tree 3 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 14
14
}
15
15
],
16
16
"require" : {
17
- "php" : " ^8.0 " ,
17
+ "php" : " ^8.1 " ,
18
18
"ext-pdo" : " *" ,
19
- "illuminate/contracts" : " ^9 .0" ,
20
- "illuminate/support" : " ^9 .0" ,
21
- "illuminate/database" : " ^9 .0" ,
19
+ "illuminate/contracts" : " ^10 .0" ,
20
+ "illuminate/support" : " ^10 .0" ,
21
+ "illuminate/database" : " ^10 .0" ,
22
22
"psr/log" : " ^1|^2|^3"
23
23
},
24
24
"autoload" : {
Original file line number Diff line number Diff line change 19
19
use Illuminate \Support \Arr ;
20
20
use Psr \Log \LoggerInterface ;
21
21
22
- class QueryLogger
22
+ final class QueryLogger
23
23
{
24
- protected LoggerInterface $ logger ;
25
- protected Repository $ config ;
26
-
27
- public function __construct (LoggerInterface $ logger , Repository $ config )
28
- {
29
- $ this ->logger = $ logger ;
30
- $ this ->config = $ config ;
31
- }
24
+ public function __construct (
25
+ private readonly LoggerInterface $ logger ,
26
+ private readonly Repository $ config ,
27
+ ) {}
32
28
33
29
public function handle (QueryExecuted $ event ): void
34
30
{
Original file line number Diff line number Diff line change 9
9
10
10
class QueryLoggerServiceProvider extends ServiceProvider
11
11
{
12
- public function boot (Repository $ config , Dispatcher $ events )
12
+ public function boot (Repository $ config , Dispatcher $ events ): void
13
13
{
14
14
if ($ config ->get ('app.debug ' ) === true ) {
15
15
$ events ->listen (QueryExecuted::class, QueryLogger::class);
You can’t perform that action at this time.
0 commit comments