PHPackages                             rewrewby/tmdb-symfony - 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. [API Development](/categories/api)
4. /
5. rewrewby/tmdb-symfony

ActiveSymfony-bundle[API Development](/categories/api)

rewrewby/tmdb-symfony
=====================

Symfony2 Bundle for TMDB ( The Movie Database ) API. Provides easy access to the php-tmdb/api library.

v2.0.3(10y ago)05MITPHPPHP &gt;=5.4.0

Since Mar 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rewrewby/tmdb-symfony)[ Packagist](https://packagist.org/packages/rewrewby/tmdb-symfony)[ Docs](https://github.com/rewrewby/tmdb-symfony)[ RSS](/packages/rewrewby-tmdb-symfony/feed)WikiDiscussions 2.0 Synced 4w ago

READMEChangelog (1)Dependencies (9)Versions (9)Used By (0)

Description
-----------

[](#description)

A Symfony2 Bundle for use together with the [php-tmdb/api](https://github.com/php-tmdb/api) TMDB Wrapper.

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

[](#installation)

Install Composer

```
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

```

Add the following to your require block in composer.json config

```
"php-tmdb/symfony": "~2.0"

```

Configuration
-------------

[](#configuration)

Register the bundle in `app/AppKernel.php`:

```
    public function registerBundles()
    {
        ...
        new Tmdb\SymfonyBundle\TmdbSymfonyBundle()
        ...
    }
```

If you haven't had the DoctrineCacheBundle yet, also register it:

```
    public function registerBundles()
    {
        ...
        new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle()
        ...
    }
```

Add to your `app/config/config.yml` the following:

```
tmdb_symfony:
    api_key: YOUR_API_KEY_HERE
```

**Configure caching**

First create a new doctrine\_cache provider with a caching provider of your preference.

```
doctrine_cache:
    providers:
        tmdb_cache:
            file_system:
                directory: %kernel.root_dir%/cache/tmdb
```

Then update the tmdb configuration with the alias:

```
tmdb_symfony:
    options:
        cache:
            enabled: true
            handler: tmdb_cache
```

This caching system will adhere to the TMDB API max-age values, if you have different needs like long TTL's you'd have to make your own implementation. We would be happy to intergrate more options, so please contribute.

**Want to make use of logging?**

```
tmdb_symfony:
    api_key: YOUR_API_KEY_HERE
    options:
        cache:
            enabled: true
        log:
            enabled: true
            #path: "%kernel.logs_dir%/tmdb.log"
```

**Disable repositories :**

```
tmdb_symfony:
    api_key: YOUR_API_KEY_HERE
    repositories:
        enabled: false
```

**Disable twig extension :**

```
tmdb_symfony:
    api_key: YOUR_API_KEY_HERE
    twig_extension:
        enabled: false
```

**Disable https :**

```
tmdb_symfony:
    api_key: YOUR_API_KEY_HERE
    options:
        secure:
            enabled: false
```

**Full configuration with defaults :**

```
tmdb_symfony:
    api_key: YOUR_API_KEY_HERE
    repositories:
        enabled: true # Set to false to disable repositories
    twig_extension:
        enabled: true # Set to false to disable twig extensions
    options:
        adapter: null
        secure: true # Set to false to disable https
        host: "api.themoviedb.org/3/"
        session_token: null
        cache:
            enabled: true # Set to false to disable cache
            path: "%kernel.cache_dir%/themoviedb"
            handler: null
            subscriber: null
        log:
            enabled: false # Set to true to enable log
            path: "%kernel.logs_dir%/themoviedb.log"
            level: DEBUG
            handler: null
            subscriber: null
```

Usage
-----

[](#usage)

Obtaining the client

```
$client = $this->get('tmdb.client');
```

Obtaining repositories

```
$movie = $this->get('tmdb.movie_repository')->load(13);
```

An overview of all the repositories can be found in the services configuration [repositories.xml](https://github.com/php-tmdb/symfony/blob/master/Resources/config/repositories.xml).

There is also a Twig helper that makes use of the `Tmdb\Helper\ImageHelper` to output urls and html.

```
{{ movie.backdropImage|tmdb_image_url }}

{{ movie.backdropImage|tmdb_image_html('original', null, 50)|raw }}
```

**For all all other interactions take a look at [php-tmdb/api](https://github.com/php-tmdb/api).**

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~111 days

Recently: every ~101 days

Total

8

Last Release

3701d ago

Major Versions

v1.2.1 → v2.0.02015-04-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9310599?v=4)[REW](/maintainers/rewrewby)[@rewrewby](https://github.com/rewrewby)

---

Top Contributors

[![wtfzdotnet](https://avatars.githubusercontent.com/u/639376?v=4)](https://github.com/wtfzdotnet "wtfzdotnet (54 commits)")[![Guilain](https://avatars.githubusercontent.com/u/4057005?v=4)](https://github.com/Guilain "Guilain (5 commits)")[![norkunas](https://avatars.githubusercontent.com/u/2722872?v=4)](https://github.com/norkunas "norkunas (3 commits)")[![rewrewby](https://avatars.githubusercontent.com/u/9310599?v=4)](https://github.com/rewrewby "rewrewby (2 commits)")[![danielsunnerberg](https://avatars.githubusercontent.com/u/2690957?v=4)](https://github.com/danielsunnerberg "danielsunnerberg (1 commits)")[![web-mi](https://avatars.githubusercontent.com/u/1172672?v=4)](https://github.com/web-mi "web-mi (1 commits)")

---

Tags

phpapisymfonySymfony2wrappermovietv showtvtvdbtmdb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rewrewby-tmdb-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/rewrewby-tmdb-symfony/health.svg)](https://phpackages.com/packages/rewrewby-tmdb-symfony)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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