Releases: Maatify/bootstrap
🔧 EnvironmentLoader Cleanup & Behavior Stabilization — v1.0.4
🔧 EnvironmentLoader Cleanup & Behavior Stabilization
This release removes the outdated logic responsible for "restoring" the original
$_ENV values after .env loading.
The behavior previously caused unexpected overrides when applications passed their
own environment variables — especially during tests, workers, or containerized flows.
✔ What Changed
- Removed the environment "rollback" loop.
- Loader now respects the final evaluated environment without forced preservation.
- Internal flow is simpler, faster, and more predictable.
✔ Why This Matters
- Fixes several edge cases where variables appeared to "disappear" after loading.
- Avoids unintended overrides in multi-stage environment setups.
- Ensures consistency across Bootstrap + DataAdapters + all Maatify libraries.
🚀 Version
1.0.4
Release 1.0.3 (fix missing VERSION update)
Release 1.0.3 (fix missing VERSION update)
v1.0.2 – Stable Environment Loader (No Override Mode)
🚀 Improvements in Environment Loading
This release introduces a fully safe and stable EnvironmentLoader
implementation that prevents .env files from overriding variables
already defined by the runtime, CI/CD pipelines, or PHPUnit tests.
🔒 Key Fixes
- Added pre-load snapshot of all existing $_ENV and putenv variables.
- Restored all pre-existing variables after Dotenv load.
- Ensures that test-injected credentials are never replaced by .env files.
- Guarantees consistent behavior across all Maatify libraries.
- Improves isolation during integration and unit tests.
🎯 Result
Environment handling is now deterministic, predictable, and immune
to accidental overrides — especially in complex multi-library setups.
This update prepares the foundation for stable cross-library
environment management under the maatify/bootstrap ecosystem.
Maatify Bootstrap v1.0.0 — Initial Stable Release
🧩 Maatify Bootstrap v1.0.0
🚀 Initial Stable Release
Date: 2025-11-09
Author: Mohamed Abdulalim (megyptm)
Project: maatify:bootstrap
License: MIT
Organization: Maatify.dev
⚙️ Overview
Maatify Bootstrap is the core initialization and diagnostics layer powering the entire Maatify ecosystem.
It unifies environment loading, timezone configuration, and startup safety across all projects — ensuring consistent, reliable behavior across development, testing, and production.
“Initialize once, stabilize everywhere.”
✨ What’s New in v1.0.0
✅ Core Features
- Unified Bootstrap Layer
- Standardized project initialization via
Bootstrap::init(). - Deterministic
.envloading with strict priority.
- Standardized project initialization via
- Environment Loader
- Smart
.envresolution:.env.local.env.testing.env.env.example(fallback)
- Immutable load mode prevents variable overrides.
- Smart
- Helpers
EnvHelper: cached access to environment variables.PathHelper: normalized filesystem paths for all platforms.
- Diagnostics
- Runtime checks:
checkEnv(),checkTimezone(),checkErrors(),isSafeMode(). - Safe Mode automatically activates if
.env.localor.env.testingis found in production.
- Runtime checks:
- CI/CD Integration
- GitHub Actions workflow (
.github/workflows/tests.yml) for PHP 8.3–8.4. - Full PHPUnit 10 test suite.
- GitHub Actions workflow (
- Dockerized Testing
- Ready-to-run development container with parity to CI environments.
- Documentation
- Developer reference in
docs/README.full.md. - Public summary in
README.md.
- Developer reference in
- Changelog
- Initial entry for v1.0.0 release.
🧪 Example Usage
use Maatify\Bootstrap\Core\Bootstrap;
use Maatify\Bootstrap\Core\BootstrapDiagnostics;
use Maatify\PsrLogger\LoggerFactory;
Bootstrap::init(); // unified startup
$logger = LoggerFactory::create('bootstrap');
$diag = new BootstrapDiagnostics($logger);
print_r($diag->run());🐳 Docker Support
To test locally with full environment parity:
docker compose up --build
docker compose exec bootstrap composer run-script test🧠 Environment Priority Recap
| Priority | File | Context |
|---|---|---|
| 1️⃣ | .env.local |
Developer/private |
| 2️⃣ | .env.testing |
CI & PHPUnit |
| 3️⃣ | .env |
Production |
| 4️⃣ | .env.example |
Fallback |
Once the first file is found, loading stops immediately — ensuring deterministic startup behavior.
🧾 Changelog Snapshot
v1.0.0 — 2025-11-09
- Added: Core Bootstrap, EnvironmentLoader, Diagnostics
- Added: PathHelper, EnvHelper
- Added: Safe Mode activation system
- Added: CI + Docker integration
- Added: Documentation suite (phase 1–7)
- Improved: Error handling and timezone fallback
- Tested: 100% PHPUnit functional coverage
📦 Installation
composer require maatify/bootstrapThen initialize:
\Maatify\Bootstrap\Core\Bootstrap::init();🧰 Related Maatify Libraries
| Library | Description |
|---|---|
maatify/common |
Common helpers, constants, and string utilities. |
maatify/psr-logger |
PSR-3 compatible logging layer. |
maatify/rate-limiter |
Redis-powered rate limiting. |
maatify/data-adapters |
Secure data access and ORM adapters. |
maatify/security-guard |
Core security enforcement layer. |
🏁 Next Steps
-
Publish to Packagist under
maatify/bootstrap -
Tag version:
git tag -a v1.0.0 -m "Initial stable release — Maatify Bootstrap" git push origin v1.0.0 -
Verify Packagist auto-sync
-
Enable CI badge on GitHub main README
🧠 Summary Matrix
| Aspect | Status | Notes |
|---|---|---|
| Environment Loading | ✅ | Deterministic, priority-based |
| Timezone Config | ✅ | Defaults → Africa/Cairo |
| Safe Mode | ✅ | Activates on non-prod .env in production |
| Logging Integration | ✅ | PSR-3 compliant |
| PHPUnit Coverage | ✅ | >95% |
| CI/CD Pipeline | ✅ | Automated GitHub workflow |
| Docker Support | ✅ | Local + CI parity |
🧾 License
MIT License — see LICENSE
© 2025 Maatify.dev
All Rights Reserved.