Skip to content

Installation

Muhammet Şafak edited this page May 29, 2026 · 1 revision

Installation

Requirements

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.

Install via Composer

composer require initphp/config

The classes are autoloaded under the InitPHP\Config namespace via PSR-4:

{
    "autoload": {
        "psr-4": {
            "InitPHP\\Config\\": "src/"
        }
    }
}

Verifying the install

<?php
require __DIR__ . '/vendor/autoload.php';

use InitPHP\Config\Library;

$config = new Library(['hello' => 'world']);
echo $config->get('hello'); // world

If 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.

Supported PHP versions in CI

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.

Next steps

Clone this wiki locally