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 6161 "tightenco/collect" : " ^5.0" ,
6262 "phpseclib/phpseclib" : " ^2.0" ,
6363 "softlayer/objectstorage" : " dev-master" ,
64- "vlucas/phpdotenv" : " ^3 .0" ,
64+ "vlucas/phpdotenv" : " ^4 .0" ,
6565 "google/apiclient" :" ^2.0" ,
6666 "php-opencloud/openstack" : " ^3.0" ,
6767 "arhitector/yandex" : " ^2.0" ,
7676 "phpseclib/phpseclib" : " Require '^2.0' to use SFTP sync" ,
7777 "softlayer/objectstorage" : " Require 'dev-master' to sync to Softlayer" ,
7878 "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" ,
8080 "google/apiclient" :" Require ^2.0 to sync to Google Drive" ,
8181 "arhitector/yandex" :" Require ^2.0 to sync to Yandex Disk" ,
8282 "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)
4343 {
4444 $ path = AppUtil \Arr::getValue ($ conf , 'file ' , '.env ' );
4545 $ 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+ }
4753 $ this ->dotenv ->load ();
4854 }
4955
You can’t perform that action at this time.
0 commit comments