Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[![PSR-12](https://img.shields.io/badge/Code%20Style-PSR--12-blue.svg)](phpcs.xml)
[![Coverage](https://img.shields.io/badge/Coverage-93.98%25-brightgreen.svg)](https://github.com/jardisSupport/dotenv)

> Part of the **[Jardis Business Platform](https://jardis.io)** — Enterprise-grade PHP components for Domain-Driven Design
> Part of **[Jardis](https://jardis.io)** — the Domain-Driven Design platform for PHP. You model your domain; Jardis generates the production-ready hexagonal code (DTOs, Command/Query handlers, repositories, persistence). This package is part of the open-source foundation that generated code runs on.

Environment file loader with cascading overrides, variable interpolation, type casting, and include directives. Goes beyond simple .env parsing — supports public and private loading modes, nested variable references, and an extensible cast chain.
A .env loader for PHP with cascading overrides, variable interpolation, type casting, and include directives. Goes beyond simple .env parsing — supports public and private loading modes, nested variable references, and an extensible cast chain.

---

Expand All @@ -22,7 +22,7 @@ Environment file loader with cascading overrides, variable interpolation, type c
- **Home Path Expansion** — `~/` is expanded to the OS home directory in both loading modes
- **Include Directives** — `load(.env.database)` and `load?(.env.optional)` split configuration across multiple files
- **Circular Include Detection** — prevents infinite include loops with a typed `CircularEnvIncludeException`
- **Docker `_FILE` Secret Resolution** — `DB_PASSWORD_FILE=/run/secrets/db_password` reads the file and exposes the content as `DB_PASSWORD`. Works with Docker Swarm, Kubernetes mounted secrets, and any file-based secret store. Combines seamlessly with [`jardissupport/secret`](https://github.com/jardisSupport/secret) — a `_FILE` that contains `secret(aes:...)` is decrypted automatically through the cast chain
- **Docker `_FILE` Secret Resolution** — `DB_PASSWORD_FILE=/run/secrets/db_password` reads the file and exposes the content as `DB_PASSWORD`. Works with Docker Swarm, Kubernetes mounted secrets, and any file-based secret store. Combines with [`jardissupport/secret`](https://github.com/jardisSupport/secret) — a `_FILE` that contains `secret(aes:...)` is decrypted automatically through the cast chain
- **Extensible via `addHandler()`** — prepend or append custom cast handlers; remove built-in ones via `removeHandler()`

---
Expand Down
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@
"dotenv",
"env",
"environment",
"environment-variables",
"configuration",
"loader",
"context",
"domain driven design",
"jardisSupport",
"contract",
"php",
"domain-driven-design",
"hexagonal-architecture",
"jardissupport",
"jardis"
]
}
8 changes: 8 additions & 0 deletions support/makefile/hooks.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ install-hooks: ## Install git hooks (pre-commit + pre-push)
@echo '# Jardis Pre-Push Hook — Quality Gate' >> .git/hooks/pre-push
@echo 'set -e' >> .git/hooks/pre-push
@echo 'echo "=== Jardis Pre-Push Quality Gate ==="' >> .git/hooks/pre-push
@echo '# Doku-Fast-Path: keine *.php geaendert -> PHP-Gates ueberspringen (kein --no-verify, der Hook entscheidet korrekt)' >> .git/hooks/pre-push
@echo 'base="$$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo origin/develop)"' >> .git/hooks/pre-push
@echo 'changed="$$(git diff --name-only "$$base"...HEAD 2>/dev/null)"' >> .git/hooks/pre-push
@echo 'if ! echo "$$changed" | grep -q "[.]php$$"; then' >> .git/hooks/pre-push
@echo ' echo ">>> Nur Doku/Metadaten geaendert (keine *.php) — phpcs/phpstan/phpunit uebersprungen"' >> .git/hooks/pre-push
@echo ' echo "=== Quality Gate (Doku-Fast-Path) bestanden ==="' >> .git/hooks/pre-push
@echo ' exit 0' >> .git/hooks/pre-push
@echo 'fi' >> .git/hooks/pre-push
@echo 'echo ">>> make phpcs"' >> .git/hooks/pre-push
@echo 'make phpcs || { echo "PHPCS fehlgeschlagen — Push abgebrochen"; exit 1; }' >> .git/hooks/pre-push
@echo 'echo ">>> make phpstan"' >> .git/hooks/pre-push
Expand Down
Loading