PHPackages                             2lenet/file-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. 2lenet/file-bundle

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

2lenet/file-bundle
==================

File Bundle

1.0.3(1y ago)22461[1 PRs](https://github.com/2lenet/FileBundle/pulls)MITPHP

Since Sep 24Pushed 1y agoCompare

[ Source](https://github.com/2lenet/FileBundle)[ Packagist](https://packagist.org/packages/2lenet/file-bundle)[ Docs](https://www.2le.net)[ RSS](/packages/2lenet-file-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (12)Versions (6)Used By (0)

FileBundle
==========

[](#filebundle)

[![Validate](https://github.com/2lenet/FileBundle/actions/workflows/validate.yml/badge.svg)](https://github.com/2lenet/FileBundle/actions/workflows/validate.yml)[![.github/workflows/test.yml](https://github.com/2lenet/FileBundle/actions/workflows/test.yml/badge.svg)](https://github.com/2lenet/FileBundle/actions/workflows/test.yml)[![SymfonyInsight](https://camo.githubusercontent.com/e7c86dc9990f0c802411371a3d9684ff55da6f02da3e17c94273aa4597809b2f/68747470733a2f2f696e73696768742e73796d666f6e792e636f6d2f70726f6a656374732f37393538336332372d646262352d343631302d616363642d3165653136623932303038642f6d696e692e737667)](https://insight.symfony.com/projects/79583c27-dbb5-4610-accd-1ee16b92008d)

Symfony bundle that standardize the way of handling data file associated with an entity

- [Installation](#Installation)
- [Customization](#Customization)
- [Usage](#Usage)

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

[](#installation)

The bundle is not yet on packagist make sure to add the following to your `composer.json` file:

```
{
    "url": "https://github.com/2lenet/FileBundle",
    "type": "git"
}
```

Install with composer:

```
composer require 2lenet/file-bundle
```

Usage
-----

[](#usage)

in your controller or service juste use the fileManager to get the db and absolute path to use to store your data.

```
        $fileSpec = $this->fileManager->getLocalFilename(
            ENTITY::PDFSTORAGENAME,
            $object,
            "pdf"
        );
```

- This function take a first parameter which is the name of the store. Une one store for each field in each entity. It's a good practice to set a constant in the entitiy Class
- The second parameter is an object ( good to have a getId on it but not required ). Optionnally you can have a getDateForFilename to get the date to use for creating the folders.
- The third optionnal parameter is the extension to add to the file ( default .bin). Don't set the .

The function return a FileSpec object with two attribute

- dbPath is the path to use to store in your database ( relative from the projectDir )
- absPath is the filename to use to write your data ( open it with standard functions )

Path are build this way ( $projectDir / data / $storeName / Y / M / D / $objet-&gt;getId() . $ext ) if the folder does not exist it is created with the right right. Y/M/D is the year, month and day from the $object-&gt;getDateForFilename() if it exist, instead it use the today date.

```
        file_put_contents($fileSpec->absPath,$youdata);
        $object->setLocalPdf($fileSpec->dbPath);
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

644d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b715c92f6219caaeecb8f1a8d511ebfa17f05c2b868875dbefaaf95c0dd0df91?d=identicon)[sebheitzmann](/maintainers/sebheitzmann)

---

Top Contributors

[![sebheitzmann](https://avatars.githubusercontent.com/u/2197902?v=4)](https://github.com/sebheitzmann "sebheitzmann (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/2lenet-file-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/2lenet-file-bundle/health.svg)](https://phpackages.com/packages/2lenet-file-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[symfony/web-profiler-bundle

Provides a development tool that gives detailed information about the execution of any request

2.3k160.5M1.2k](/packages/symfony-web-profiler-bundle)[sylius/resource-bundle

Resource component for Sylius.

23610.8M235](/packages/sylius-resource-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.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.7k](/packages/ahmed-bhs-doctrine-doctor)[ecotone/symfony-bundle

Ecotone for Symfony — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Symfony Messenger, via PHP attributes.

11249.0k1](/packages/ecotone-symfony-bundle)

PHPackages © 2026

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