ReviewOS

also looking at this

meemalabs/meema-client-php

Add env file checker

#45
Merged glennmichael123 wants to merge add-env-checker into main
2 files +21 -17
composer.lockmodified+16-16
Changes to composer.lock
@@ -4,7 +4,7 @@
44 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
55 "This file is @generated automatically"
66 ],
7 "content-hash": "cba54d5f31b561344ec7d6c9d78f2c00",
7 "content-hash": "31d096966aaebed73b9a2e1749db54bc",
88 "packages": [
99 {
1010 "name": "brick/math",
@@ -804,16 +804,16 @@
804804 },
805805 {
806806 "name": "laravel/framework",
807 "version": "v8.35.1",
807 "version": "v8.36.2",
808808 "source": {
809809 "type": "git",
810810 "url": "https://github.com/laravel/framework.git",
811 "reference": "d118c0df39e7524131176aaf76493eae63a8a602"
811 "reference": "0debd8ad6b5aa1f61ccc73910adf049af4ca0444"
812812 },
813813 "dist": {
814814 "type": "zip",
815 "url": "https://api.github.com/repos/laravel/framework/zipball/d118c0df39e7524131176aaf76493eae63a8a602",
816 "reference": "d118c0df39e7524131176aaf76493eae63a8a602",
815 "url": "https://api.github.com/repos/laravel/framework/zipball/0debd8ad6b5aa1f61ccc73910adf049af4ca0444",
816 "reference": "0debd8ad6b5aa1f61ccc73910adf049af4ca0444",
817817 "shasum": ""
818818 },
819819 "require": {
@@ -964,7 +964,7 @@
964964 "framework",
965965 "laravel"
966966 ],
967 "time": "2021-03-30T21:34:17+00:00"
967 "time": "2021-04-07T12:37:22+00:00"
968968 },
969969 {
970970 "name": "league/commonmark",
@@ -1561,16 +1561,16 @@
15611561 },
15621562 {
15631563 "name": "opis/closure",
1564 "version": "3.6.1",
1564 "version": "3.6.2",
15651565 "source": {
15661566 "type": "git",
15671567 "url": "https://github.com/opis/closure.git",
1568 "reference": "943b5d70cc5ae7483f6aff6ff43d7e34592ca0f5"
1568 "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6"
15691569 },
15701570 "dist": {
15711571 "type": "zip",
1572 "url": "https://api.github.com/repos/opis/closure/zipball/943b5d70cc5ae7483f6aff6ff43d7e34592ca0f5",
1573 "reference": "943b5d70cc5ae7483f6aff6ff43d7e34592ca0f5",
1572 "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6",
1573 "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6",
15741574 "shasum": ""
15751575 },
15761576 "require": {
@@ -1618,7 +1618,7 @@
16181618 "serialization",
16191619 "serialize"
16201620 ],
1621 "time": "2020-11-07T02:01:34+00:00"
1621 "time": "2021-04-09T13:42:10+00:00"
16221622 },
16231623 {
16241624 "name": "orchestra/testbench",
@@ -7081,16 +7081,16 @@
70817081 },
70827082 {
70837083 "name": "nunomaduro/collision",
7084 "version": "v5.3.0",
7084 "version": "v5.4.0",
70857085 "source": {
70867086 "type": "git",
70877087 "url": "https://github.com/nunomaduro/collision.git",
7088 "reference": "aca63581f380f63a492b1e3114604e411e39133a"
7088 "reference": "41b7e9999133d5082700d31a1d0977161df8322a"
70897089 },
70907090 "dist": {
70917091 "type": "zip",
7092 "url": "https://api.github.com/repos/nunomaduro/collision/zipball/aca63581f380f63a492b1e3114604e411e39133a",
7093 "reference": "aca63581f380f63a492b1e3114604e411e39133a",
7092 "url": "https://api.github.com/repos/nunomaduro/collision/zipball/41b7e9999133d5082700d31a1d0977161df8322a",
7093 "reference": "41b7e9999133d5082700d31a1d0977161df8322a",
70947094 "shasum": ""
70957095 },
70967096 "require": {
@@ -7161,7 +7161,7 @@
71617161 "type": "patreon"
71627162 }
71637163 ],
7164 "time": "2021-01-25T15:34:13+00:00"
7164 "time": "2021-04-09T13:38:32+00:00"
71657165 },
71667166 {
71677167 "name": "pestphp/pest",
src/Client.phpmodified+5-1
Changes to src/Client.php
@@ -44,8 +44,12 @@ class Client
4444 *
4545 * @return void
4646 */
47 public function initializeEnv(): void
47 public function initializeEnv()
4848 {
49 if (! file_exists(dirname(__DIR__))) {
50 return;
51 }
52
4953 $dotenv = Dotenv::createImmutable(dirname(__DIR__));
5054 $dotenv->load();
5155 }