PHPackages                             davisben/suitcase - 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. davisben/suitcase

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

davisben/suitcase
=================

File based data store

0.2.1(6y ago)14MITPHPPHP &gt;=7.1CI failing

Since Aug 10Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (5)Used By (0)

Suitcase
========

[](#suitcase)

[![Build Status](https://camo.githubusercontent.com/80547fe228fe89c8a077e38a58e8ed630b8703bd85dbf1b05727717db355df46/68747470733a2f2f7472617669732d63692e6f72672f646176697362656e2f73756974636173652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/davisben/suitcase) [![Coverage](https://camo.githubusercontent.com/71dc5525ec5f07876d18496a64d0160faba5d83ef84a25ab5aad448a1cc7ba9b/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d646176697362656e5f7375697463617365266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=davisben_suitcase) [![Security Rating](https://camo.githubusercontent.com/3c5957edaf98b8aeffd95cbe2965b7ed97882b58e05e65a75b7ae8ef69cfeaa8/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d646176697362656e5f7375697463617365266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=davisben_suitcase)

Suitcase is a flat file data store that takes advantage of other libraries to abstact the filesystem and encoding/decoding of data. The filesystem storage is handled by [Flysystem](https://flysystem.thephpleague.com/), so data can be stored locally, in memory, on S3, etc. The data processing is handled by [Ivory Serializer](https://github.com/egeloen/ivory-serializer), which supports JSON, YAML, XML, and CSV formats. Data is stored in collections, which are subdirectories of the primary store directory. Items can be accessed individually, or an entire collection can be returned.

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

[](#requirements)

- PHP 7.1+
- PHP JSON extension

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

[](#installation)

```
composer require davisben/suitcase

```

Usage
-----

[](#usage)

Suitcase requires a Flysystem Filesystem object to act as an interface to the filesystem. The following example uses the Local adapter. For more information, see

Also required is a Serializer object to use to encode and decode the data.

#### Create the store

[](#create-the-store)

```
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Ivory\Serializer\Serializer;
use Suitcase\Format\Json;
use Suitcase\Store;

$adapter = new Local(__DIR__ . '/data');
$filesystem = new Filesystem($adapter);
$serializer = new Serializer();
$formatter = new Json($serializer);
$store = new Store($filesystem, $formatter);
$store->setCollection('collection');
```

#### Working with data

[](#working-with-data)

```
// Saves data into file.json.
$data = ['some' => 'data'];
$store->save('file', $data);

// Reads data from file.json.
$data = $store->read('file');

// Reads all data from the current collection.
$data = $store->readAll();

// Deletes file.json.
$store->delete('file');

// Deletes all files in the current collection.
$store->deleteAll();

// Delete a collection, and all files within.
$store->deleteCollection('collection');
```

License
-------

[](#license)

Suitcase is licensed under the [MIT License](https://github.com/davisben/suitcase/blob/master/LICENSE).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

4

Last Release

2301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/613b80ed728de85824131a6df0eacbd75bd76062a57feea001e77b587da2aa2f?d=identicon)[davisben](/maintainers/davisben)

---

Top Contributors

[![davisben](https://avatars.githubusercontent.com/u/1123824?v=4)](https://github.com/davisben "davisben (34 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/davisben-suitcase/health.svg)

```
[![Health](https://phpackages.com/badges/davisben-suitcase/health.svg)](https://phpackages.com/packages/davisben-suitcase)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40029.5M87](/packages/league-flysystem-bundle)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)

PHPackages © 2026

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