PHPackages                             ibrows/association-resolver-bundle - 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. ibrows/association-resolver-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ibrows/association-resolver-bundle
==================================

Resolve relations over annotations

1.0.6(11y ago)012.1kMITPHPPHP &gt;=5.3.0

Since Feb 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ibrows/IbrowsAssociationResolverBundle)[ Packagist](https://packagist.org/packages/ibrows/association-resolver-bundle)[ RSS](/packages/ibrows-association-resolver-bundle/feed)WikiDiscussions master Synced 1mo ago

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

Important:
==========

[](#important)

This Bundle is now stored here:

iBrows Association Bundle
=========================

[](#ibrows-association-bundle)

A simple bundle to resolve associations on entities when they'll be imported from an external source
### Create an annotation

[](#create-an-annotation)

*See Annotation/OneToMany.php*In this case I'm going to create a new OneToMany-annotation for this bundle. Therefore I create a new class called OneToMany in the 'Annotation' folder and annotate the class with `@Annotation` and extend it from the `AbstractAssociation`If you need to add some properties which can be configured in the annotation create a public property in the Annotation and create the getter/setter

### Create the resolver

[](#create-the-resolver)

*See Resolver/Type/OneToMany.php*To handle the entity with our annotation @OneToMany we have to create a resolver with the exact same name as the annotation class name. Our resolver extends the AbstractResolver to handle the annotated entity correctly. While extending the AbstractResolver we have to implement an abstract function to handle an entity and recive all the configurated properties.

    ```

        /**
         * @param ResultBag $resultBag
         * @param AssociationMappingInfoInterface $mappingInfo
         * @param string $propertyName
         * @param mixed $entity
         * @param OutputInterface $output
         * @return ResolverInterface
         */
        public function resolveAssociation(
            ResultBag $resultBag,
            AssociationMappingInfoInterface $mappingInfo,
            $propertyName,
            $entity,
            OutputInterface $output
        )

```

in the function body we extract the data from the mappinginfo for further operations. Inside the MappingInfo object where two properties. The Annotation and the Metadata. The Annotation object holds all the data which can be configured in the annotation. In our case we have 2 properties

```
public $collectionAddFunctionName;
public $collectionRemoveFunctionName;
```

`collectionAddFunctionName` to customize the add function. If this property is not set the method name will be generated with an 'add' as prefix and the propertyname as suffix

`collectionRemoveFunctionName` to customize the remove function. If this property is not set the method name will be generated with an 'remove' as prefix and the propertyname as suffix

### The Service

[](#the-service)

To make the resolver functional you have to register the resolver as a service in the service.xml ```

        %ibrows_associationresolver.softdelete%

        %ibrows_associationresolver.softdeletegetter%

´

```

The tag defines the position in the chain.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~90 days

Recently: every ~132 days

Total

7

Last Release

4291d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/31dcaa71007628affe5a759a757d17182e05ab88f2b018a46d74c62bc10d8249?d=identicon)[ibrows](/maintainers/ibrows)

---

Top Contributors

[![dominikzogg](https://avatars.githubusercontent.com/u/1011217?v=4)](https://github.com/dominikzogg "dominikzogg (3 commits)")[![dylangonzalezz](https://avatars.githubusercontent.com/u/24675864?v=4)](https://github.com/dylangonzalezz "dylangonzalezz (1 commits)")[![mikemeier](https://avatars.githubusercontent.com/u/776406?v=4)](https://github.com/mikemeier "mikemeier (1 commits)")

---

Tags

resolverannotationibrowsassociation

### Embed Badge

![Health badge](/badges/ibrows-association-resolver-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ibrows-association-resolver-bundle/health.svg)](https://phpackages.com/packages/ibrows-association-resolver-bundle)
```

###  Alternatives

[dflydev/placeholder-resolver

Given a data source representing key =&gt; value pairs, resolve placeholders like ${foo.bar} to the value associated with the 'foo.bar' key in the data source.

14414.6M3](/packages/dflydev-placeholder-resolver)[koriym/attributes

An annotation/attribute reader

433.4M12](/packages/koriym-attributes)[hyperf/di

A DI for Hyperf.

182.8M594](/packages/hyperf-di)[rybakit/arguments-resolver

ArgumentsResolver allows you to determine the arguments to pass to a function or method.

26107.7k7](/packages/rybakit-arguments-resolver)[gomachan46/state-machine

simple state machine with annotations for PHP, inspired by AASM known as a Ruby state machine.

1893.9k](/packages/gomachan46-state-machine)[marcin-orlowski/lombok-php

Never write boilerplate code for your data class again!

3118.6k1](/packages/marcin-orlowski-lombok-php)

PHPackages © 2026

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