PHPackages                             xaddax/factories - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. xaddax/factories

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

xaddax/factories
================

Factories

v1.0(7y ago)0871MITPHPPHP &gt;=7.1

Since Mar 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xaddax/factories)[ Packagist](https://packagist.org/packages/xaddax/factories)[ RSS](/packages/xaddax-factories/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

XADDAX Factories
================

[](#xaddax-factories)

Install
-------

[](#install)

```
composer require xaddax/factories
```

GatherConfigValues
------------------

[](#gatherconfigvalues)

This will look for values from both the Laminus config files and a .env file. Usage

```
    $values = (new GatherConfigValues)($container, 'group');
```

if in your .env file you have

```
GROUP_MY_VALUE=42
GROUP_IS_AWESOME=true
NOTGROUP_IS_AWESOME=false

```

and in your `*.global.php` you have

```
return [
    'group' => [
        'isFun' = true,
        'options' => [
            'color' => 'purple',
            'size'  => 'large',
        ],
    ],
];
```

then $values would look like

```
[
    'myValue'   => 42,
    'isAwesome' => true,
    'isFun'     => true,
    'options'   => [
        'color' => 'purple',
        'size'  => 'large',
    ],
]
```

MongoDB
-------

[](#mongodb)

The configuration can happen through ENV variables, autoload configuration or a combination of the two, with ENV taking priority.

`config/autoload/mongodb.global.php`

```
return [
    'mongodb' => [
        'uri' => 'mongodb://127.0.0.1/',
        'uriOptions' => [],
        'serverOptions' => [], // todo
    ],
];
```

uriOptions can be found [in the PHP documentation](http://php.net/mongodb-driver-manager.construct#mongodb-driver-manager.construct-urioptions)

environment variables

```
MONGODB_URI=mongodb://127.0.0.1/

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd5a2c6deedf2f52379d21fa55c9f5c6d0999b0ac1ca2ca2f33293e229107bfe?d=identicon)[iampersistent](/maintainers/iampersistent)

---

Tags

PSR-11factoryzend-expressive

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/xaddax-factories/health.svg)

```
[![Health](https://phpackages.com/badges/xaddax-factories/health.svg)](https://phpackages.com/packages/xaddax-factories)
```

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[laminas/laminas-servicemanager

Factory-Driven Dependency Injection Container

15955.1M694](/packages/laminas-laminas-servicemanager)[laminas/laminas-di

Automated dependency injection for PSR-11 containers

3618.1M38](/packages/laminas-laminas-di)[bnf/phpstan-psr-container

PHPStan dynamic return type extension for PSR-11 ContainerInterface

133.5M53](/packages/bnf-phpstan-psr-container)[slince/di

A flexible dependency injection container

20260.4k6](/packages/slince-di)[chubbyphp/chubbyphp-container

A simple PSR-11 container implementation.

1978.4k14](/packages/chubbyphp-chubbyphp-container)

PHPackages © 2026

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