File tree Expand file tree Collapse file tree 4 files changed +19
-9
lines changed Expand file tree Collapse file tree 4 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ sudo: required
44php :
55 - 7.1
66 - 7.2
7+ - 7.3
78
89env :
910 matrix :
Original file line number Diff line number Diff line change 2020 "composer/semver" : " ^1.4" ,
2121 "geerlingguy/ping" : " ^1.1" ,
2222 "illuminate/support" : " 5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*" ,
23- "vlucas/phpdotenv" : " ~2.5"
23+ "vlucas/phpdotenv" : " ~2.5|~3.3 "
2424 },
2525 "require-dev" : {
2626 "larapack/dd" : " ^1.0" ,
2727 "mockery/mockery" : " ^1.0" ,
28- "orchestra/testbench" : " ~3.5" ,
28+ "orchestra/testbench" : " ~3.5|~3.8 " ,
2929 "phpunit/phpunit" : " ^7.0" ,
3030 "predis/predis" : " ^1.1" ,
3131 "scrutinizer/ocular" : " ^1.5"
4343 "scripts" : {
4444 "test" : " vendor/bin/phpunit" ,
4545 "test-coverage" : " vendor/bin/phpunit --coverage-html coverage"
46-
4746 },
4847 "config" : {
4948 "sort-packages" : true
Original file line number Diff line number Diff line change @@ -29,10 +29,15 @@ public function name(array $config): string
2929 */
3030 public function check (array $ config ): bool
3131 {
32- $ examples = new Dotenv (base_path (), '.env.example ' );
33- $ examples ->safeLoad ();
32+ if (interface_exists (\Dotenv \Environment \FactoryInterface::class)) {
33+ $ examples = Dotenv::create (base_path (), '.env.example ' );
34+ $ actual = Dotenv::create (base_path (), '.env ' );
35+ } else {
36+ $ examples = new Dotenv (base_path (), '.env.example ' );
37+ $ actual = new Dotenv (base_path (), '.env ' );
38+ }
3439
35- $ actual = new Dotenv ( base_path (), ' .env ' );
40+ $ examples -> safeLoad ( );
3641 $ actual ->safeLoad ();
3742
3843 $ this ->envVariables = Collection::make ($ examples ->getEnvironmentVariableNames ())
Original file line number Diff line number Diff line change @@ -29,10 +29,15 @@ public function name(array $config): string
2929 */
3030 public function check (array $ config ): bool
3131 {
32- $ examples = new Dotenv (base_path (), '.env.example ' );
33- $ examples ->safeLoad ();
32+ if (interface_exists (\Dotenv \Environment \FactoryInterface::class)) {
33+ $ examples = Dotenv::create (base_path (), '.env.example ' );
34+ $ actual = Dotenv::create (base_path (), '.env ' );
35+ } else {
36+ $ examples = new Dotenv (base_path (), '.env.example ' );
37+ $ actual = new Dotenv (base_path (), '.env ' );
38+ }
3439
35- $ actual = new Dotenv ( base_path (), ' .env ' );
40+ $ examples -> safeLoad ( );
3641 $ actual ->safeLoad ();
3742
3843 $ this ->envVariables = Collection::make ($ actual ->getEnvironmentVariableNames ())
You can’t perform that action at this time.
0 commit comments