-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
| PHP |
^7.4 || ^8.0 (tested up to 8.4) |
| Extensions | None |
| Runtime dependencies | None |
The package has zero runtime dependencies. Development dependencies
(PHPUnit, PHPStan, PHP-CS-Fixer) live under require-dev and are not
installed when you depend on initphp/parameterbag from another
project.
composer require initphp/parameterbagThe classes are autoloaded under the InitPHP\ParameterBag namespace
via PSR-4:
{
"autoload": {
"psr-4": {
"InitPHP\\ParameterBag\\": "src/"
}
}
}<?php
require __DIR__ . '/vendor/autoload.php';
use InitPHP\ParameterBag\ParameterBag;
$bag = new ParameterBag(['hello' => 'world']);
echo $bag->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 the bag.
Every PR runs the test matrix against:
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4
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.
- See the full list of configuration knobs in Configuration.
- Upgrading from v1? Read the Migration Guide.
initphp/parameterbag · MIT License · part of the InitPHP family
Source · Issues · Discussions · Packagist · Contributing · Security Policy
Getting Started
Core Usage
Reference
Practical Guides
Migration & Help