File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ### 0.2.1
4+
5+ - Fix array_filter filtering out all env variables
6+ - Change method name from ` addEnvVars() ` to ` withEnvVars() ` to match configuration.
7+
38### 0.2.0
49
510- Add method and configuration to allow the ability to add env variables to the array of env vars that will be passed to the process
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ var_dump ($ _ENV , getenv ());
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ public function useRouter(string $path): self
114114 return $ this ;
115115 }
116116
117- public function addEnvVars (array $ vars ): self
117+ public function withEnvVars (array $ vars ): self
118118 {
119119 $ this ->envVarsToPass = array_merge (
120120 $ this ->envVarsToPass ,
@@ -164,7 +164,7 @@ private function buildServeCommand(): array
164164 private function buildPassingEnvVarArray (): array
165165 {
166166 return array_merge (array_filter ($ this ->envVarsToPass , function ($ key ) {
167- return in_array ($ key , $ this ->configuration ['withoutEnvVars ' ]);
167+ return ! in_array ($ key , $ this ->configuration ['withoutEnvVars ' ]);
168168 }, ARRAY_FILTER_USE_KEY ), $ this ->configuration ['withEnvVars ' ]);
169169 }
170170
You can’t perform that action at this time.
0 commit comments