PHPackages                             celema/wire - 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. celema/wire

ActiveLibrary

celema/wire
===========

Autowiring object creator and argument resolver

0.7.0(1mo ago)079↓66.7%4MITPHPPHP ^8.5CI passing

Since Nov 11Pushed 1w ago1 watchersCompare

[ Source](https://github.com/celemas/wire)[ Packagist](https://packagist.org/packages/celema/wire)[ Docs](https://celema.dev/wire)[ RSS](/packages/celema-wire/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (2)Versions (8)Used By (4)

Celema Wire
===========

[](#celema-wire)

[![ci](https://camo.githubusercontent.com/52d210c70941dd527cec928cacc6935bff81dbdd6e1b4355628edaf67496843e/68747470733a2f2f636f6465666c6f652e636f6d2f63656c656d612f776972652f6261646765732f776f726b666c6f77732f63692e796d6c2f62616467652e7376673f7374796c653d666c6174266c6f676f3d666f7267656a6f266c6f676f436f6c6f723d7768697465266c6162656c3d6369)](https://codefloe.com/celema/wire/actions)[![code coverage](https://camo.githubusercontent.com/25a6d8c9349c20b1cba100f5c7687a1e9ed10e9668c8723784d746233e6f66cc/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246636f762e63656c656d612e64657625324663656c656d6125324677697265253246636f646525324662616467652e6a736f6e)](https://cov.celema.dev/celema/wire/code)[![type coverage](https://camo.githubusercontent.com/ecb37cd36be3156c67814a277ee0e59fce6e4cc46a6acc30a024af1823b298f9/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246636f762e63656c656d612e64657625324663656c656d6125324677697265253246747970657325324662616467652d636f7665722e6a736f6e)](https://cov.celema.dev/celema/wire/types)[![psalm level](https://camo.githubusercontent.com/4b950973508ead73444dd5494252eb00cd9c398ae727e649143ac1691eb21e28/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d6874747073253341253246253246636f762e63656c656d612e64657625324663656c656d6125324677697265253246747970657325324662616467652d6c6576656c2e6a736f6e)](https://cov.celema.dev/celema/wire/types)[![Software License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE.md)

***Wire*** provides an autowiring object creator that utilizes PHP's reflection capabilities to automatically resolve constructor arguments recursively. It additionally comes with classes that assist in resolving arguments of callables such as functions, methods, closures or class constructors. It can be combined with a PSR-11 dependency injection container.

**Wire** is a PHP dependency injection tool that automatically constructs objects by resolving their dependencies. Using PHP's reflection API, **Wire** recursively analyzes and fulfills constructor arguments without manual configuration. It additionally includes utilities for resolving dependencies in various callable types—including functions, methods, closures, and class constructors. ***Wire*** seamlessly integrates with PSR-11 compliant dependency injection containers.

Documentation can be found on the website: [celema.dev/wire](https://celema.dev/wire/)

Installation
------------

[](#installation)

```
composer require celema/wire
```

Basic usage
-----------

[](#basic-usage)

```
use Celema\Wire\Wire;

class Value
{
    public function get(): string
    {
        return 'Autowired Value';
    }
}

class Model
{
    public function __construct(protected Value $value) {}

    public function value(): string
    {
        return $this->value->get();
    }
}

$creator = Wire::creator();
$model = $creator->create(Model::class);

assert($model instanceof Model);
assert($model->value() === 'Autowired Value');
```

Scoped container usage
----------------------

[](#scoped-container-usage)

When you pass a scoped container to `Creator`, callable resolvers and `Inject` entry lookups resolve against that current scope first.

This allows parent-owned definitions (for example root shared services) and scope-local overrides (for example request-local values) to work together safely.

License
-------

[](#license)

This project is licensed under the [MIT license](LICENSE.md).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance94

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~163 days

Recently: every ~228 days

Total

7

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c15f1690b643e5cbf205fd28f3b2ebb6c7448d34774bb92b7952150c901a689?d=identicon)[ernstla](/maintainers/ernstla)

---

Top Contributors

[![ernstla](https://avatars.githubusercontent.com/u/683620?v=4)](https://github.com/ernstla "ernstla (233 commits)")

---

Tags

factoryAutowiringiocautowirecelema

### Embed Badge

![Health badge](/badges/celema-wire/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.7M2.3k](/packages/symfony-symfony)[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k473.8M11.1k](/packages/symfony-dependency-injection)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k53.2M403](/packages/api-platform-core)[tempest/framework

The PHP framework that gets out of your way.

2.3k42.4k21](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

571604.7k69](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

769306.5k56](/packages/civicrm-civicrm-core)

PHPackages © 2026

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