File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 61
61
"tightenco/collect" : " ^5.0" ,
62
62
"phpseclib/phpseclib" : " ^2.0" ,
63
63
"softlayer/objectstorage" : " dev-master" ,
64
- "vlucas/phpdotenv" : " ^3 .0" ,
64
+ "vlucas/phpdotenv" : " ^4 .0" ,
65
65
"google/apiclient" :" ^2.0" ,
66
66
"php-opencloud/openstack" : " ^3.0" ,
67
67
"arhitector/yandex" : " ^2.0" ,
76
76
"phpseclib/phpseclib" : " Require '^2.0' to use SFTP sync" ,
77
77
"softlayer/objectstorage" : " Require 'dev-master' to sync to Softlayer" ,
78
78
"php-opencloud/openstack" : " Require ^3.0 to sync to OpenStack" ,
79
- "vlucas/phpdotenv" : " Require ^3.0 to use Dotenv adapter" ,
79
+ "vlucas/phpdotenv" : " Require ^3.0 or ^4.0 to use the Dotenv adapter" ,
80
80
"google/apiclient" :" Require ^2.0 to sync to Google Drive" ,
81
81
"arhitector/yandex" :" Require ^2.0 to sync to Yandex Disk" ,
82
82
"microsoft/azure-storage-blob" : " Require ^1.4 to sync to Azure Blob Storage"
Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ public function setup(array $conf)
43
43
{
44
44
$ path = AppUtil \Arr::getValue ($ conf , 'file ' , '.env ' );
45
45
$ this ->file = AppUtil \Path::toAbsolutePath ($ path , Configuration::getWorkingDirectory ());
46
- $ this ->dotenv = DotenvLib::create (dirname ($ this ->file ), basename ($ this ->file ));
46
+
47
+ // dotenv version 4 and higher
48
+ if (method_exists ('Dotenv \\Dotenv ' ,'createImmutable ' )) {
49
+ $ this ->dotenv = DotenvLib::createImmutable (dirname ($ this ->file ), basename ($ this ->file ));
50
+ } else {
51
+ $ this ->dotenv = DotenvLib::create (dirname ($ this ->file ), basename ($ this ->file ));
52
+ }
47
53
$ this ->dotenv ->load ();
48
54
}
49
55
You can’t perform that action at this time.
0 commit comments