PHPackages                             celemas/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. celemas/wire

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

celemas/wire
============

Autowiring object creator and argument resolver

0.6.0(4w ago)0461MITPHPPHP ^8.5CI passing

Since Nov 11Pushed 3w ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (7)Used By (1)

Celemas Wire
============

[](#celemas-wire)

[![ci](https://github.com/celemas/wire/actions/workflows/ci.yml/badge.svg)](https://github.com/celemas/wire/actions)[![codecov](https://camo.githubusercontent.com/6573a97f07e9625cc9dc8831d9669bfb38cde29c8ffdedca2a92f103c6c58521/68747470733a2f2f636f6465636f762e696f2f6769746875622f63656c656d61732f776972652f67726170682f62616467652e7376673f746f6b656e3d4e5042594e5a37503242)](https://codecov.io/github/celemas/wire)[![psalm coverage](https://camo.githubusercontent.com/af3dcfc42d507e5f871d9779519d9194147184ecbefdd5c2c81a84e126358575/68747470733a2f2f73686570686572642e6465762f6769746875622f63656c656d61732f776972652f636f7665726167652e7376673f)](https://shepherd.dev/github/celemas/wire)[![psalm level](https://camo.githubusercontent.com/59153e09ffe47d4dae500f09aed7aab20d0c3628053016ccc834f5dc00b3256a/68747470733a2f2f73686570686572642e6465762f6769746875622f63656c656d61732f776972652f6c6576656c2e7376673f)](https://shepherd.dev/github/celemas/wire)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](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: [celemas.dev/wire](https://celemas.dev/wire/)

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

[](#installation)

```
composer require celemas/wire
```

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

[](#basic-usage)

```
use Celemas\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

45

—

FairBetter than 91% of packages

Maintenance95

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Recently: every ~214 days

Total

6

Last Release

28d 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 (221 commits)")

---

Tags

factoryAutowiringiocautowirecelemas

### Embed Badge

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

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

###  Alternatives

[symfony/dependency-injection

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

4.2k447.1M8.9k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

706127.7M12.4k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31080.7M2.3k](/packages/illuminate-container)[symfony/type-info

Extracts PHP types information.

20062.9M225](/packages/symfony-type-info)[ecotone/ecotone

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

562565.8k41](/packages/ecotone-ecotone)[civicrm/civicrm-core

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

744284.3k34](/packages/civicrm-civicrm-core)

PHPackages © 2026

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