PHPackages                             andres-montanez/recommendations-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. andres-montanez/recommendations-bundle

AbandonedSymfony-bundle

andres-montanez/recommendations-bundle
======================================

Symfony2 bundle that implements a Recommendations Engine with MongoDB

5192PHP

Since Nov 21Pushed 11y ago2 watchersCompare

[ Source](https://github.com/andres-montanez/RecommendationsBundle)[ Packagist](https://packagist.org/packages/andres-montanez/recommendations-bundle)[ RSS](/packages/andres-montanez-recommendations-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#RecommendationsBundle

**A Built In Recommendations Engine with Symfony and MongoDB**

The recommendations are Item-Based, and use the Pearson Distance for matching similar items.

A cron job must be defined to run periodically so the items affinities can be updated.

The service `andres_montanez_recommendations.recommendation` enables you to

- `registerItem`: register an item, you can specify a type (eg: movie), tags (eg: drama, action), and a namespace.
- `addAction`: allows to register a user interaction. You can specify the user, a verb (eg: rated), an item, a value, and a namespace.
- `getRecommendations`: you get recommendations for a given user. You can narrow the results specifying a type, tag, and a namespace.

Example of an interaction: "User «Jon» «rated» the «movie Batman» with a value of «5»"

The namespace is if you want to use the engine on multiple sites but with only one instance, so recommendations will only be made for items registered on that namespace. For the values of users, items, and tags, an Integer value is recommended.

The main algorithms are based on the code of O'Reilly's Collective Intelligence.

The bundle has been tested with a datasets of:

- 100K ratings, 943 users, and 1682 items: ~4 minutes for similarities generations, under 2 seconds for getting user recommendations.
- 1 Million ratings, 6040 users, and 3883 items: ~90 minutes for similarities generations, under 2 seconds for getting user recommendations.

Datasets available at:

I recommend building a service wrapper around this service so you can fit better your requirements, and also add as many cache layers as you want. Have in mind that with large datasets, the results will vary slowly, it will take a lot of user interaction to change the similarities between two items, therefore altering the recommendation. Regenerating the similarities once per week is a good place to start. Also caching the user's recommendations for 24-48 hours is also recommended, because this won't change often unless the user rates more items.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f34fb3e3938758c55b23bb88b88fc5cfc729d7afeb14edcb785c5487dd1a431e?d=identicon)[andres.montanez](/maintainers/andres.montanez)

---

Top Contributors

[![andres-montanez](https://avatars.githubusercontent.com/u/541125?v=4)](https://github.com/andres-montanez "andres-montanez (9 commits)")

### Embed Badge

![Health badge](/badges/andres-montanez-recommendations-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/andres-montanez-recommendations-bundle/health.svg)](https://phpackages.com/packages/andres-montanez-recommendations-bundle)
```

PHPackages © 2026

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