Download the PHP package oihana/php-init without Composer
On this page you can find all versions of the php package oihana/php-init. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oihana/php-init
More information about oihana/php-init
Files in oihana/php-init
Package php-init
Short Description The Oihana PHP Init library
License MPL-2.0
Homepage https://github.com/BcommeBois/oihana-php-init
Informations about the package php-init
Oihana PHP - Init

Application bootstrap helpers for PHP 8.4+ — config loading, DI container building and PHP runtime setup.
📚 Documentation
User guides (FR + EN), with narrative explanations and examples:
| 🇬🇧 English documentation | 🇫🇷 Documentation française |
|---|---|
| Getting started, configuration, container & definitions, runtime, testing. | Démarrage, configuration, conteneur & définitions, runtime, tests. |
Auto-generated API reference (phpDocumentor):
👉 https://bcommebois.github.io/oihana-php-init
🧠 What is it?
oihana/php-init is a small set of free functions that bootstrap a PHP
application: load and merge a TOML/array configuration, build a
PHP-DI container from definition files, and configure the
PHP runtime (timezone, error reporting, memory limit, ini directives).
🚀 Features
- ⚙️ Config loading & merging (TOML + PHP arrays) —
initConfig(). - 📦 PHP-DI container building from definitions —
initContainer(),initDefinitions(). - 🕐 PHP runtime setup —
initDefaultTimezone(),initErrors(),initMemoryLimit(),setIniIfExists(). - 🧩 Plain free functions, autoloaded — no framework lock-in.
- 🧪 Full unit-test coverage ensuring reliability and maintainability.
💡 Designed to be lightweight, testable, and compatible with any PHP 8.4+ project.
📦 Installation
Requires PHP 8.4+
Install via Composer:
✅ Tests & coverage
Run the full unit-test suite (PHPUnit, strict mode):
Run a single test case:
Measure coverage (requires Xdebug or PCOV):
The suite runs in strict mode and targets 100% line coverage.
🧾 License
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
👤 About the author
- Author : Marc ALCARAZ (aka eKameleon)
- Mail : [email protected]
- Website : http://www.ooop.fr
🛠️ Generate the Documentation
We use phpDocumentor to generate the documentation into the ./docs folder.
Usage
Run the command :
🔗 Related packages
- oihana/php-files – file, path and TOML config helpers used to load configuration.
- oihana/php-enums – strongly-typed constant enumerations (
IniOptions, …). - oihana/php-reflect – reflection utilities and exception types.
All versions of php-init with dependencies
oihana/php-enums Version dev-main
oihana/php-files Version dev-main
oihana/php-reflect Version dev-main
php-di/php-di Version ^7.0
devium/toml Version ^1.0