PHPackages                             rossriley/doctrine-uploader - 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. rossriley/doctrine-uploader

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

rossriley/doctrine-uploader
===========================

Small package to handle file uploads via a save to a Flysystem Handler

1.0(10y ago)238MITPHP

Since Jun 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/rossriley/doctrine-uploader)[ Packagist](https://packagist.org/packages/rossriley/doctrine-uploader)[ RSS](/packages/rossriley-doctrine-uploader/feed)WikiDiscussions master Synced yesterday

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

### Doctrine Uploader

[](#doctrine-uploader)

This is a very basic composer package designed to slot into an existing Doctrine ORM based project.

The listener takes care of handling file uploads and saves the resulting path to the Entity.

#### How to bootstrap

[](#how-to-bootstrap)

##### Define your entity targets.

[](#define-your-entity-targets)

This is an array in the format Entity\\Class=&gt;\[field1,field2\] for example.

```
$targets = [
    'Myproject\Entity\User' => ['logo','profilepic'],
    'Myproject\Entity\Company' => ['logo']
];

```

##### Provide a filesystem handler

[](#provide-a-filesystem-handler)

This project uses Flysystem() to handle saves. The simplest usage is as follows.

```
$fsAdapter = new League\Flysystem\Adapter\Local('/path/to/save');
$filesystem = new League\Flysystem\Filesystem($fsAdapter);
$handler = Handler($filesystem);

```

##### Add the listener to your EntityManager setup with the above setup

[](#add-the-listener-to-your-entitymanager-setup-with-the-above-setup)

```
use Doctrine\Uploader\Listener;

$em->getEventManager()->addEventListener([Doctrine\ORM\Events::preUpdate], new Listener($handler, $targets));

```

##### Putting it all together.

[](#putting-it-all-together)

```
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Doctrine\Uploader\Listener;
use Doctrine\Uploader\Handler;

$targets = [
    'Myproject\Entity\User' => ['logo','profilepic'],
    'Myproject\Entity\Company' => ['logo']
];

$fsAdapter = new Local('/path/to/save');
$filesystem = new Filesystem($fsAdapter);
$handler = Handler($filesystem);

$em->getEventManager()->addEventListener([Doctrine\ORM\Events::preUpdate], new Listener($handler, $targets));

```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3945d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5082?v=4)[Ross Riley](/maintainers/rossriley)[@rossriley](https://github.com/rossriley)

---

Top Contributors

[![rossriley](https://avatars.githubusercontent.com/u/5082?v=4)](https://github.com/rossriley "rossriley (18 commits)")

### Embed Badge

![Health badge](/badges/rossriley-doctrine-uploader/health.svg)

```
[![Health](https://phpackages.com/badges/rossriley-doctrine-uploader/health.svg)](https://phpackages.com/packages/rossriley-doctrine-uploader)
```

###  Alternatives

[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k293.8M1.2k](/packages/league-flysystem-aws-s3-v3)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M235](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9626.1k68](/packages/open-dxp-opendxp)

PHPackages © 2026

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