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 2mo ago

READMEChangelogDependenciesVersions (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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity46

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

2296d ago

### Community

---

Top Contributors

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

### 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

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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