This repository was archived by the owner on Mar 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ protected function fixConfig()
38
38
collect (Arr::dot (config ()->all ()))->filter (function ($ item ) {
39
39
return is_string ($ item ) && Str::startsWith ($ item , Credentials::CONFIG_PREFIX );
40
40
})->map (function ($ item , $ key ) {
41
- $ item = str_replace_first (Credentials::CONFIG_PREFIX , '' , $ item );
41
+ $ item = Str:: replaceFirst (Credentials::CONFIG_PREFIX , '' , $ item );
42
42
43
43
config ()->set ($ key , credentials ($ item ));
44
44
});
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
use BeyondCode \Credentials \Credentials ;
4
+ use Illuminate \Contracts \Container \BindingResolutionException ;
4
5
5
6
if (! function_exists ('credentials ' )) {
6
7
/**
13
14
function credentials (string $ key , $ default = null )
14
15
{
15
16
$ filename = config ('credentials.file ' );
16
-
17
17
try {
18
18
$ credentials = app (Credentials::class);
19
19
$ credentials ->load ($ filename );
20
20
21
21
return $ credentials ->get ($ key , $ default );
22
- } catch (ReflectionException $ e ) {
23
- return Credentials::CONFIG_PREFIX .$ key ;
22
+
23
+ } catch (ReflectionException | BindingResolutionException $ e ) {
24
+
25
+ return Credentials::CONFIG_PREFIX . $ key ;
26
+
24
27
}
28
+
25
29
}
26
30
}
You can’t perform that action at this time.
0 commit comments