Download the PHP package lane4hub/dotenv without Composer
On this page you can find all versions of the php package lane4hub/dotenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lane4hub/dotenv
More information about lane4hub/dotenv
Files in lane4hub/dotenv
Package dotenv
Short Description Advanced functions dotEnv tool for reading .env files for global and protected contexts
License MIT
Homepage https://github.com/lane4hub/dotenv
Informations about the package dotenv
Jardis DotEnv
A support tool for reading .env files in global and protected contexts
Description
Jardis DotEnv enables reading .env*
files according to the well-established rules for .env files. The extracted values can be made available either in the global $_ENV
variable or in protected contexts, such as an application domain.
The .env*
files must be placed in a subdirectory and read using the load($path, false)
method. This approach allows for different settings compared to the global $_ENV
without causing interference. This is particularly useful when refactoring a monolithic application and creating protected areas with their own values within an existing application.
Features
- Read
.env*
files in a protected context .env
files with arrays
Example Code
Data Types
The tool recognizes and processes the following data types:
string
bool
numerics (int, float)
array
(with type casting of values)
A special feature is the support for both numeric and associative arrays in .env*
files.
Special Features
You also have the option to customize three strategies for processing .env
files via constructor injection.
With this approach, you can customize how .env
files are searched (GetFilesFromPath
), how values are read from the files (GetValuesFromFiles
), and how type conversion (CastTypeHandler
) is handled.
Quickstart with Composer
Quickstart via GitHub
Contents in the GitHub Repository
- Source Files:
src
tests
- Support:
- Docker Compose
.env
pre-commit-hook.sh
Makefile
(Simply runmake
in the console)
- Documentation:
README.md
The structure of the Dockerfile for creating the PHP image is somewhat more extensive than necessary for this tool because the resulting PHP image is used in various Lane4 tools.
We also ensure that our images are as small as possible and do not leave unnecessary files on your system, even when images are rebuilt multiple times.
Jardis Framework
This tool is part of the development of our Domain-Driven Design framework Jardis
(Just a reliable domain integration system).
Jardis
consists of a collection of highly professional PHP software packages and concepts based on DDD, explicitly developed for the efficient and sustainable solution of complex business applications.
Our development is based on defined standards such as DDD and PSR, aiming to deliver the highest possible quality for functional and non-functional requirements.
For technical quality assurance, we use PhpStan Level 8, PhpCS, and generate full test coverage with PhpUnit.
Our software packages meet the following quality attributes:
- Analyzability
- Adaptability
- Extensibility
- Modularity
- Maintainability
- Testability
- Scalability
- High performance