PHPackages                             gulios/sxf-config - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gulios/sxf-config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gulios/sxf-config
=================

SXF Config Component

1.1.1(7y ago)0121MITPHPPHP ^7.1.3

Since Aug 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gulios/sxf-config)[ Packagist](https://packagist.org/packages/gulios/sxf-config)[ Docs](https://www.gulios.com)[ RSS](/packages/gulios-sxf-config/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (8)Versions (6)Used By (1)

SXF - Config Component
======================

[](#sxf---config-component)

The Config component based on Illuminate and DotEnv packages. (Laravel idea)

Features
--------

[](#features)

- store authorization values in .env
- use cached configuration
- default values for ENV
- nested configuration structure

##### Example usage:

[](#example-usage)

1. Use [Composer](http://getcomposer.org) to install SXF Config into your project:

    ```
    composer require gulios/sxf-config
    ```
2. Initialize in your code:

```
$basePath = realpath(__DIR__ . '/../') . DIRECTORY_SEPARATOR;

$configuration = new Config();
$configuration->setConfigFilesPath($basePath . 'config/');
$configuration->setEnvFile($basePath . '.env');
$configuration->setCacheConfigFile($basePath . 'cache/configuration.php');
```

You can get configuration by:

```
$configuration->getAll();

```

or

```
$configuration->get('app.debug')

```

etc

##### Configuration data

[](#configuration-data)

Package scan all .php files in defined path (setConfigFilesPath()).

Example file 'config/app.php'

```
return [
    'first_test' => env('TEST', 'defaultvalue'),
    'second_test' => [
        'key' => 'value'
    ]
];
```

As you see if you don't set TEST value in .env file it will get 'defaultvalue'.

Config directory structure can be nested.

##### Cache

[](#cache)

You can execute just:

```
$configuration->clearCache();
or
$configuration->createCache();
```

or if you use Symfony console you can use two commands:

```
$config = new Config();
$config->setConfigFilesPath($basePath . 'config/');
$config->setEnvFile($basePath . '.env');
$config->setCacheConfigFile($basePath . 'cache/configuration.php');

$app = new Application();

$app->add(
    new ConfigCacheCommand(
        $config->getConfigFilesPath(),
        $config->getEnvFile(),
        $config->getCacheConfigFile()
    )
);
$app->add(
    new ConfigCacheClearCommand(
        $config->getConfigFilesPath(),
        $config->getEnvFile(),
        $config->getCacheConfigFile()
    )
);

$app->run();
```

and run:

```
php bin/console config:
  Command "config:" is ambiguous.
  Did you mean one of these?
      config:create Create a cache file for faster configuration loading
      config:clear  Remove the configuration cache file
```

it will create cache file with all your configuration.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

5

Last Release

2802d ago

PHP version history (3 changes)1.0.0PHP &gt;=7.2

1.0.1PHP &gt;=7.1

1.1.1PHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e6de057fd4090a41f9e02a7a4c02b61fcd5bb07fe4cc29fdc8d9a1fd2a2107c?d=identicon)[gulios](/maintainers/gulios)

---

Top Contributors

[![gulios](https://avatars.githubusercontent.com/u/14802005?v=4)](https://github.com/gulios "gulios (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gulios-sxf-config/health.svg)

```
[![Health](https://phpackages.com/badges/gulios-sxf-config/health.svg)](https://phpackages.com/packages/gulios-sxf-config)
```

###  Alternatives

[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M368](/packages/laravel-zero-framework)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M121](/packages/ramsey-conventional-commits)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
