github vlucas/phpdotenv v3.0.0
V3.0.0 (03/01/2019)

latest releases: v5.6.0, v5.5.0, v4.3.0...
5 years ago

Happy new year, and happy new release! We've made some important improvements to this library since v2 (such as first-class support for multiline variables), but maintained much of the same API where possible.

New Features

  • More flexibility in terms of which parts of the environment we try to read and modify (#300)
  • First-class support for multiline variables (#301)
  • No more trimming of values. you get them exactly as is now (#302)
  • Accept a list of paths to try in order looking for the dotenv file, rather than a single path (#307)
  • Stronger validation of variable names to avoid silent failures or obscure errors (#311)

Upgrading Notes

  • Replace new Dotenv(...) with Dotenv::create(...) (#300)
  • Loader::load() and its callers now return an associative array of the variables loaded with their values, rather than an array of raw lines from the environment file (#306)
  • As mentioned in the new feature, we're no longer trimming values, so that may be a breaking change for you (#302)

Please see the upgrading guide for more detail.

Don't miss a new phpdotenv release

NewReleases is sending notifications on new releases.