PHPackages                             thapp/iocconf - 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. thapp/iocconf

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

thapp/iocconf
=============

ioc container configuration using xml

v1.0.1(13y ago)116MITPHP

Since Apr 29Pushed 13y ago1 watchersCompare

[ Source](https://github.com/iwyg/iocconf)[ Packagist](https://packagist.org/packages/thapp/iocconf)[ RSS](/packages/thapp-iocconf/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Populate and configure Laravel's IoC container with xml
=======================================================

[](#populate-and-configure-laravels-ioc-container-with-xml)

[![Build Status](https://camo.githubusercontent.com/310eac31edcfdc5e69c832cfe0958bcc162270f15584a798bc666240e22dbeb1/68747470733a2f2f7472617669732d63692e6f72672f697779672f696f63636f6e662e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/iwyg/iocconf)

Synopsis
--------

[](#synopsis)

IoCConf provides a convenient way to handle dependecy injection using xml. E.g. it is possible to setup your controllers with either contructor or setter injection.

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

[](#installation)

IocConf requires [XmlConf](https://github.com/iwyg/xmlconf) to work.

Add thapp/iocconf ans thapp/xmlconf as a requirement to composer.json:

```
{
    "require": {
        "thapp/iocconf": "1.0.*",
        "thapp/xmlconf": "1.0.*"
    }
}
```

Then run `composer update` or `composer install`

Next step is to tell laravel to load the serviceprovider. In `app/config/app.php` add

```
  // ...
  'Thapp\IocConf\IocConfServiceProvider'
  // ...
```

to the `providers` array.

Make sure XmlConf is installed properly, then tell XmlConf where to find the ioc configuration (`app/config/packages/thapp/xmlconf/config.php`)

```
return array(

    /*
    |--------------------------------------------------------------------------
    | Basedir relative to the install directory
    |--------------------------------------------------------------------------
     */
    'basedir' => array(
        'ioc'      => 'vendor/thapp/iocconf/src/Thapp/IocConf'
    ),

    /*
    |--------------------------------------------------------------------------
    | Reader dictionary
    |--------------------------------------------------------------------------
     */
    'namespaces' => array(
        'ioc'      => 'Thapp\\IocConf'
    ),
);
```

Example
-------

[](#example)

Given you want to inject Laravel's view Object into a controller, the xml configuration would look something like this:

```

```

#### php

[](#php)

```
$repo = App::make('ControllerRepository');

$repo2 = App::make('ControllerRepository');

$repo === $repo2 // true
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

4809d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/238a39d7233809dc823dec269ab3058e4689e593e65d8ce988cb6d0939ce411c?d=identicon)[iwyg](/maintainers/iwyg)

---

Top Contributors

[![iwyg](https://avatars.githubusercontent.com/u/718537?v=4)](https://github.com/iwyg "iwyg (33 commits)")

### Embed Badge

![Health badge](/badges/thapp-iocconf/health.svg)

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

PHPackages © 2026

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