|
1 |
| -# Fluent dotenv |
| 1 | +# FluentDotEnv |
2 | 2 |
|
3 | 3 | [](https://packagist.org/packages/code-distortion/fluent-dotenv)
|
4 |
| - |
| 4 | +[](https://php.net) |
5 | 5 | [](https://github.com/vlucas/phpdotenv)
|
6 | 6 | [](https://github.com/symfony/dotenv)
|
7 | 7 | [](https://github.com/code-distortion/fluent-dotenv/actions)
|
@@ -272,13 +272,13 @@ $fDotEnv = FluentDotEnv::new()
|
272 | 272 |
|
273 | 273 | ### Putenv() and getenv()
|
274 | 274 |
|
275 |
| -The `putenv(…)` and `getenv(…)` functions are not thread-safe which may cause issues in a multi-threaded environment. For this reason this functionality is not included in this package. You can read discussion about this [here](https://github.com/vlucas/phpdotenv/issues/76) and [here](https://github.com/symfony/symfony/discussions/49928). |
| 275 | +The `putenv(…)` and `getenv(…)` functions are not thread-safe, which may cause issues in a multi-threaded environment. For this reason this functionality is not included in this package. You can read discussion about this [here](https://github.com/vlucas/phpdotenv/issues/76) and [here](https://github.com/symfony/symfony/discussions/49928). |
276 | 276 |
|
277 |
| -> ***NOTE:*** symfony/dotenv [added an option to turn off the use of putenv()](https://github.com/symfony/dotenv/commit/e1f27138406a700c01d4e05e861226bb0c28b83a#diff-b73348fec7eb6dfdb482d959a985979c5bead6091837e488319d75983556f5e7R74-L74) in version 5.1.0. FluentDotEnv uses this. In earlier versions, it uses putenv() without a way to turn it off. |
| 277 | +> ***NOTE:*** If you're using symfony/dotenv, you may want to consider using version 5.1.0 or higher… |
| 278 | +> |
| 279 | +> symfony/dotenv [added an option to turn off the use of putenv()](https://github.com/symfony/dotenv/commit/e1f27138406a700c01d4e05e861226bb0c28b83a#diff-b73348fec7eb6dfdb482d959a985979c5bead6091837e488319d75983556f5e7R74-L74) in version 5.1.0. FluentDotEnv uses this to make sure the environment variables don't get changed. However, in earlier versions putenv() is used without a way to turn it off. |
278 | 280 | >
|
279 | 281 | > FluentDotEnv hides this away, leaving your environment variables the same as they were before loading. ***But***, it means that environment variables are changed temporarily during the `->load()` process.
|
280 |
| -> |
281 |
| -> If you're using symfony/dotenv, you may want to consider using version 5.1.0 or higher. |
282 | 282 |
|
283 | 283 |
|
284 | 284 |
|
|
0 commit comments