PHPackages                             symplify/default-autowire - 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. symplify/default-autowire

Abandoned → [symfony/dependency-injection](/?search=symfony%2Fdependency-injection)Library[Utility &amp; Helpers](/categories/utility)

symplify/default-autowire
=========================

Adds autowire to services when needed.

v1.4.10(9y ago)622.3k↓33.3%1PHPPHP ^7.1

Since Feb 1Pushed 9y ago2 watchersCompare

[ Source](https://github.com/deprecated-packages/DefaultAutowire)[ Packagist](https://packagist.org/packages/symplify/default-autowire)[ RSS](/packages/symplify-default-autowire/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (39)Used By (0)

Default Autowire
================

[](#default-autowire)

[![Build Status](https://camo.githubusercontent.com/de8f970e47d523af0d28e3a03a5f32cf1caa8ee61854bff8ed2cdc25f882266b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f53796d706c6966792f44656661756c744175746f776972652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Symplify/DefaultAutowire)[![Code Coverage](https://camo.githubusercontent.com/d827c8a848c751e0c79e71e22e9e31f39dbee13dca7821d699982d3b9897ee5e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f53796d706c6966792f44656661756c744175746f776972652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Symplify/DefaultAutowire)[![Downloads](https://camo.githubusercontent.com/2c9f44f1e487fd771f48660ba044e104dff192ca3134e1c9f990ddf234130fb7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f64656661756c742d6175746f776972652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/default-autowire)

**This bundle turns on autowire for you!**

It turns this:

```
# app/config/config.yml
services:
    PriceCalculator:
        autowire: true

    ProductRepository:
        autowire: true

    UserFactory:
        autowire: true
```

Into this:

```
# app/config/config.yml
services:
    PriceCalculator: ~
    ProductRepository: ~
    UserFactory: ~
```

Install
=======

[](#install)

```
composer require symplify/default-autowire
```

Add bundle to `AppKernel.php`:

```
final class AppKernel extends Kernel
{
    public function registerBundles(): array
    {
        $bundles = [
            new Symplify\DefaultAutowire\SymplifyDefaultAutowireBundle(),
            // ...
        ];
    }
}
```

And that's it!

Features
========

[](#features)

Multiple service of one type? Set preferred one
-----------------------------------------------

[](#multiple-service-of-one-type-set-preferred-one)

In case you have multiple connections, entity managers or decorated service, **you can set default preferred service (name) for each type (class or interface)**.

To make it easier for you, there are few default values. You can change them or add new ones.

```
# app/config/cofing.yml
symplify_default_autowire:
    autowire_types:
        Doctrine\ORM\EntityManager: 'doctrine.orm.default_entity_manager'
        Doctrine\ORM\EntityManagerInterface: 'doctrine.orm.default_entity_manager'
        Doctrine\Portability\Connection: 'database_connection'
        Symfony\Component\EventDispatcher\EventDispatcher: 'event_dispatcher'
        Symfony\Component\EventDispatcher\EventDispatcherInterface: 'event_dispatcher'
        Symfony\Component\Translation\TranslatorInterface: 'translator'
```

Contributing
------------

[](#contributing)

Send [issue](https://github.com/Symplify/Symplify/issues) or [pull-request](https://github.com/Symplify/Symplify/pulls) to main repository.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 98.1% 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 ~12 days

Total

38

Last Release

3308d ago

Major Versions

v0.2.1 → v1.0.02016-07-18

v1.4.10 → v2.0.0-RC12017-04-14

PHP version history (3 changes)v0.1.0PHP ^7.0

v0.2.0PHP ^5.6|^7.0

v1.4.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (53 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (1 commits)")

---

Tags

autowireautowiringclean-codedependency-injectionsymfonysymplify

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symplify-default-autowire/health.svg)

```
[![Health](https://phpackages.com/badges/symplify-default-autowire/health.svg)](https://phpackages.com/packages/symplify-default-autowire)
```

###  Alternatives

[symfony/ux-chartjs

Chart.js integration for Symfony

1003.2M18](/packages/symfony-ux-chartjs)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)[pentiminax/ux-datatables

DataTables.net integration for Symfony

605.6k](/packages/pentiminax-ux-datatables)

PHPackages © 2026

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