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

ActiveSymfony-bundle

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

File Bundle

1.0.3(1y ago)2246↓100%1[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 1mo ago

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

28

—

LowBetter than 54% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity17

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

598d 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

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[rikudou/psr6-dynamo-db-bundle

PSR-6 and PSR-16 cache implementation using AWS DynamoDB for Symfony

2077.8k](/packages/rikudou-psr6-dynamo-db-bundle)[leapt/core-bundle

Symfony LeaptCoreBundle

2529.1k4](/packages/leapt-core-bundle)

PHPackages © 2026

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