PHPackages                             seraph/media-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. [File &amp; Storage](/categories/file-storage)
4. /
5. seraph/media-bundle

ActiveSymfony-bundle[File &amp; Storage](/categories/file-storage)

seraph/media-bundle
===================

Media Bundle is a solution to manage a multimedia library.

012PHP

Since Jul 27Pushed 7y agoCompare

[ Source](https://github.com/NilsFradin/SeraphMediaBundle)[ Packagist](https://packagist.org/packages/seraph/media-bundle)[ RSS](/packages/seraph-media-bundle/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (2)Used By (0)

SeraphMediaBundle
=================

[](#seraphmediabundle)

This bundle is a solution to manage a media library, with back end system, and twig function for the front display.

How it works
------------

[](#how-it-works)

This bundle VichUploaderBundle to work.

The back end system use **bootstrap 4** to display all templates.

The MediaBundle provide some entities, controllers, forms and twig extension.

To read more about the using of this bundle, we invite you to check the [docs](/Resources/doc).

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

[](#installation)

1. Install it using composer

    ```
    $ composer require seraph/media-bundle
    ```
2. Add SeraphMediaBundle configuration

    ```
    # app/config/packages/seraph_media.yaml

    seraph_media:
        user_class: App\Entity\User
        group_class: App\Entity\Group
        # upload_folder: /uploads/
    ```
3. Add routing of the bundle

    ```
    # app/config/routes.yaml

    seraph_media:
        resource: '@SeraphMediaBundle/Controller'
        type: annotation
        # prefix: '/admin'
    ```
4. Update your database with User, Group and UploadedFile

    ```
    $ php bin/console doctrine:schema:update --force
    ```

Using
-----

[](#using)

In this example I use FosUserBundle but you can use another bundle or your own classes.

1. Implement UserInterface

    ```
    use FOS\UserBundle\Model\User as BaseUser;
    use Doctrine\ORM\Mapping as ORM;
    use Seraph\Bundle\MediaBundle\Model\UserInterface;

    /**
     * @ORM\Entity
     * @ORM\Table(name="user")
     */
    class User extends BaseUser implements UserInterface
    {
        /**
         * @ORM\Id
         * @ORM\Column(type="integer")
         * @ORM\GeneratedValue(strategy="AUTO")
         */
        protected $id;

        /**
         * @ORM\Column(type="string", length=255, nullable=true)
         */
        protected $firstname;

        /**
         * @ORM\Column(type="string", length=255, nullable=true)
         */
        protected $name;

        /**
         * @ORM\ManyToMany(targetEntity="App\Entity\Group")
         * @ORM\JoinTable(name="user_group_user",
         *      joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")},
         *      inverseJoinColumns={@ORM\JoinColumn(name="group_user_id", referencedColumnName="id")}
         * )
         */
        protected $groups;

        /**
         * @ORM\OneToMany(targetEntity="Seraph\Bundle\MediaBundle\Entity\UploadedFile", mappedBy="user")
         */
        protected $files;

        // ...
    }
    ```
2. Implement GroupInterface

    ```
    use FOS\UserBundle\Model\Group as BaseGroup;
    use Doctrine\ORM\Mapping as ORM;
    use Seraph\Bundle\MediaBundle\Model\GroupInterface;

    /**
     * @ORM\Entity
     * @ORM\Table(name="group_user")
     */
    class Group extends BaseGroup implements GroupInterface
    {
        /**
         * @ORM\Id
         * @ORM\Column(type="integer")
         * @ORM\GeneratedValue(strategy="AUTO")
         */
        protected $id;

        /**
         * @ORM\OneToMany(targetEntity="Seraph\Bundle\MediaBundle\Entity\UploadedFile", mappedBy="group")
         */
        protected $files;

        // ...
     }
    ```

Documentation
-------------

[](#documentation)

You can find in this folder, how you can use the bundle :

- [Read the documentation for Routes](/Resources/doc/Routes.md)
- [Read the documentation for Twig Functions](/Resources/doc/TwigFunction.md)
- [Read the documentation for Forms](/Resources/doc/Forms.md)
- [Read the documentation for Interfaces and Entity](/Resources/doc/Entities.md)
- [Read the documentation for Templates](/Resources/doc/Templates.md)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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/04a20c8a8d53eb85e08fc11beeb0d27c402e3e05bd4af3daec219539d1b58264?d=identicon)[sERAPH1](/maintainers/sERAPH1)

---

Top Contributors

[![NilsFradin](https://avatars.githubusercontent.com/u/32100902?v=4)](https://github.com/NilsFradin "NilsFradin (19 commits)")

### Embed Badge

![Health badge](/badges/seraph-media-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/seraph-media-bundle/health.svg)](https://phpackages.com/packages/seraph-media-bundle)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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