-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
| PHP |
^8.1 (tested up to 8.4) |
| Extensions | None |
| Runtime dependencies |
initphp/parameterbag ^2.0
|
initphp/parameterbag is pulled in automatically by Composer. Development
dependencies (PHPUnit, PHPStan, PHP-CS-Fixer) live under require-dev and
are not installed when you depend on initphp/config from another
project.
composer require initphp/configThe classes are autoloaded under the InitPHP\Config namespace via
PSR-4:
{
"autoload": {
"psr-4": {
"InitPHP\\Config\\": "src/"
}
}
}<?php
require __DIR__ . '/vendor/autoload.php';
use InitPHP\Config\Library;
$config = new Library(['hello' => 'world']);
echo $config->get('hello'); // worldIf the autoloader cannot locate the class, double-check that you ran
composer install (or composer dump-autoload) and that your script
requires vendor/autoload.php before instantiating anything.
Every PR runs the test matrix against:
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4
The pipeline also runs static analysis (PHPStan, level 8) and a coding
standard check (PHP-CS-Fixer). If you discover a regression on a
supported version, please
file an issue and include
the PHP version reported by php -v.
- Walk through the everyday API in Quick Start.
- Learn how keys are parsed in Keys & Dotted Paths.
- Upgrading from v1? Read the Migration Guide.
initphp/config · MIT License · part of the InitPHP family
Source · Issues · Discussions · Packagist · Contributing · Security Policy
Getting Started
Core Concepts
Loading Configuration
Reference
Practical Guides
Migration & Help