PHPackages                             dwo/tagged\_services - 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. dwo/tagged\_services

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

dwo/tagged\_services
====================

find tagged services via service configuration

v1.0.0(11y ago)06.5k1MITPHPPHP &gt;=5.3.0

Since Apr 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/davewwww/TaggedServices)[ Packagist](https://packagist.org/packages/dwo/tagged_services)[ Docs](http://www.lovoo.com)[ RSS](/packages/dwo-tagged-services/feed)WikiDiscussions master Synced 1mo ago

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

[![Build Status](https://camo.githubusercontent.com/df0fef1e5bd02de5419075812f8ea670ca11475d86edac15b95a959f4fd2eae6/68747470733a2f2f7472617669732d63692e6f72672f64617665777777772f54616767656453657276696365732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/davewwww/TaggedServices) [![Coverage Status](https://camo.githubusercontent.com/2502a55732d780324ac3975db340d6f10667baac04e523c311a48f494bccac3e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f64617665777777772f54616767656453657276696365732f62616467652e737667)](https://coveralls.io/r/davewwww/TaggedServices)

============== TaggedServices
=============================

[](#taggedservices)

Find and use your tagged services via service configuration instead of building compiler passes every time.

### Installation

[](#installation)

=================

Add the CompilerPass to your AppKernel or a Bundle.

```
#AppKernel.php

protected function buildContainer()
{
    $container = parent::buildContainer();
    $container->addCompilerPass(new TaggedServicesPass());
}
```

or to your Bundle

```
#FooBundle.php

protected function build(ContainerBuilder $container)
{
    parent::build($container);
    $container->addCompilerPass(new TaggedServicesPass());
}
```

### Tag your services

[](#tag-your-services)

=====================

Tag your services with your own tag as usual and give them an name with the 'type' parameter.

```
#services.yml

services:
  my.service.foo:
    class: My\Service\Foo
    tags:
      - {name: "my.services", type: "foo"}

  my.service.bar:
    class: My\Service\Bar
    tags:
      - {name: "my.services", type: "bar"}
```

### Use your tagged services

[](#use-your-tagged-services)

============================

Now add the 'tagged\_services' tag with the 'find\_tag' parameter to the service that gets injected all tagged services.

```
#services.yml

services:
  my.service.container:
    class: My\Service\MyServiceContainer
    arguments: [[]]
    tags:
      - { name: 'tagged_services', find_tag: 'my.services' }
```

Now your MyServiceContainer will get a array with all tagged services.

```
#MyServiceContainer.php

class MyServiceContainer {

    private $myServices = array();
    private $myFooService;

    function __construct(array $myServices)
    {
        $this->myServices = $myServices;
        $this->myFooService = $myServices['foo'];
    }
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

4058d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92fbda736c9e7b2a06e4d23b0e3768f3f7cec3a609540808ef5db10c348231c0?d=identicon)[dave](/maintainers/dave)

---

Top Contributors

[![davewwww](https://avatars.githubusercontent.com/u/921303?v=4)](https://github.com/davewwww "davewwww (1 commits)")

---

Tags

dependency-injectionservicetagsfindtaggedcompilerpass

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dwo-tagged-services/health.svg)

```
[![Health](https://phpackages.com/badges/dwo-tagged-services/health.svg)](https://phpackages.com/packages/dwo-tagged-services)
```

###  Alternatives

[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)

PHPackages © 2026

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