File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ public function register(): void
23
23
__DIR__ .'/../config/tarantool-session.php ' , 'tarantool-session '
24
24
);
25
25
26
- $ this ->commands ([
27
- TransferSessionFromFileCommand::class,
28
- ]);
26
+ if ($ this ->isCurrentSessionDriverTarantool ()) {
27
+ $ this ->commands ([
28
+ TransferSessionFromFileCommand::class,
29
+ ]);
30
+ }
29
31
}
30
32
31
33
public function boot (): void
@@ -36,7 +38,7 @@ public function boot(): void
36
38
], 'tarantool-session-config ' );
37
39
}
38
40
39
- if ($ this ->app [ ' config ' ][ ' session ' ][ ' driver ' ] === self :: DRIVER_NAME ) {
41
+ if ($ this ->isCurrentSessionDriverTarantool () ) {
40
42
$ this ->app ->singleton (TarantoolSessionHandler::class, static function (Application $ app ) {
41
43
$ options = $ app ['config ' ]['tarantool-session ' ];
42
44
@@ -54,4 +56,12 @@ public function boot(): void
54
56
});
55
57
}
56
58
}
59
+
60
+ /**
61
+ * @return bool
62
+ */
63
+ public function isCurrentSessionDriverTarantool (): bool
64
+ {
65
+ return $ this ->app ['config ' ]['session ' ]['driver ' ] === self ::DRIVER_NAME ;
66
+ }
57
67
}
You can’t perform that action at this time.
0 commit comments