PHPackages                             mlo/file-loader - 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. mlo/file-loader

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

mlo/file-loader
===============

File loader with built in caching

v1.2.0(10y ago)019.9kMITPHP

Since Jul 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mloberg/FileLoader)[ Packagist](https://packagist.org/packages/mlo/file-loader)[ RSS](/packages/mlo-file-loader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

File Loader
===========

[](#file-loader)

[![Latest Stable Version](https://camo.githubusercontent.com/3591c7553f0d9ffd08f31c0994c2d246a889e0dcd2f83f6f7060832338b74200/68747470733a2f2f706f7365722e707567782e6f72672f6d6c6f2f66696c652d6c6f616465722f762f737461626c65)](https://packagist.org/packages/mlo/file-loader)[![License](https://camo.githubusercontent.com/f3ae5120810d0b5590e47651d2cc44947c0f0c870589c8cf33c469dc35f162db/68747470733a2f2f706f7365722e707567782e6f72672f6d6c6f2f66696c652d6c6f616465722f6c6963656e7365)](https://packagist.org/packages/mlo/file-loader)[![Build Status](https://camo.githubusercontent.com/1276f2893d97e2aa0dac47d5cd22a4ee86930ae76b37fce0ff84d54c167b7acf/68747470733a2f2f7472617669732d63692e6f72672f6d6c6f626572672f46696c654c6f616465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mloberg/FileLoader)[![Coverage Status](https://camo.githubusercontent.com/a4dcd748b430b1deb72cb0a677c1cfdc41fbc6a93213fd88a0f06ac96225eae4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d6c6f626572672f46696c654c6f616465722f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/mloberg/FileLoader?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/83e4f3997a2b11042aebf568f205eaec97aafae59de350edcd6476ca85bc1063/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6c6f626572672f46696c654c6f616465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mloberg/FileLoader/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/f04a90f1e881bc4f4476c0a9d76b3d90d28fbfe0577fcdb6cfb63c2c73535dce/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39613039636335382d333761332d343134652d613061342d6632343333623635633031342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/9a09cc58-37a3-414e-a0a4-f2433b65c014)

FileLoader allows you to load files from a collection of directories and then caches the results for faster access later.

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

[](#installation)

```
composer require mlo/file-loader

```

Requirements
------------

[](#requirements)

The following PHP versions are supported.

- PHP 5.4
- PHP 5.5
- PHP 5.6
- PHP 7.0
- HHVM

The following versions of Symfony components are supported.

- 2.3
- 2.7
- 2.8
- 3.0

Overview
--------

[](#overview)

```
$cacheDirectory = 'app/cache/config';
$dataDirectory  = 'app/config';

$loader = new \Mlo\FileLoader\FileLoader($cacheDirectory, $dataDirectory, [
    new \Mlo\FileLoader\IniFileLoader(),
    new \Mlo\FileLoader\JsonFileLoader(),
    new \Mlo\FileLoader\YamlFileLoader(),
]);

$config = $loader->load('database.yml');
```

Supported File Types
--------------------

[](#supported-file-types)

- YAML (.yml/.yaml)
- JSON (.json)
- INI (.ini)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity66

Established project with proven stability

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 ~65 days

Total

4

Last Release

3776d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b7bb02bd7aebd8ca0d722ceb4162a00dc9b0e523ce9b5eb7b88d8fef6bff43f?d=identicon)[mloberg](/maintainers/mloberg)

---

Tags

php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mlo-file-loader/health.svg)

```
[![Health](https://phpackages.com/badges/mlo-file-loader/health.svg)](https://phpackages.com/packages/mlo-file-loader)
```

###  Alternatives

[vich/uploader-bundle

Ease file uploads attached to entities

1.9k25.9M116](/packages/vich-uploader-bundle)[sylius/resource-bundle

Resource component for Sylius.

23410.2M173](/packages/sylius-resource-bundle)[symfony/ux-dropzone

File input dropzones for Symfony Forms

541.5M4](/packages/symfony-ux-dropzone)

PHPackages © 2026

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