1.0.0
This is the 1.0.0 release of the container library!
There are three behavioral changes that could be possible BC breaks from the 0.x line:
env()now sources from$_ENVbeforegetenv(). Previously only getenv() was checked.- envvars are now read once when the container is initialized, where previously they were read on the fly. In the unlikely event you modify envvars after the container is initialized throughout the application lifecycle (this is a very bad idea), those updates will no longer be reflected in the container
ValueRetreivalExceptionis now correctly spelledValueRetrievalException(you should still only catch the PSR-11ContainerExceptionInterface, though). If you were catching it anyway, you should a) just catch the PSR interface or b) update to the new name if you really have a good reason.
The first change is to increase compatibility with the default/recommended behavior of vlucas/dotenv, which will write into $_ENV but not call putenv(). Basically, there's no need to use unsafe mode to support this library (though you still can). Under the majority of deployments, this will be fully compatible. If you have variables_order set to a value that excludes E and S (this is rare) in php.ini, you may encounter unexpected behavior. See README for details.
If any code writes non-string values into $_ENV, reading it will cause an error. This is consistent with the previous getenv-backed environment reads, which could only be a string.
What's Changed
- Overhaul README by @Firehed in #59
- Remove now-redundant assertion by @Firehed in #66
- Allow customization of autodetected environment names by @Firehed in #65
- Bump CI versions by @Firehed in #67
- Explicitly test behavior of 'set but empty' by @Firehed in #68
- Read from $_ENV over getenv() by @Firehed in #69
- Set up
__debugInfo()method by @Firehed in #70 - Set up spellcheck linter by @Firehed in #72
- Fix README inconsistencies by @Firehed in #71
- Handle and test dotenv interoperability by @Firehed in #74
Full Changelog: 0.10.0...1.0.0