PHPackages                             matthieuwerner/dynamodb-storable - 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. matthieuwerner/dynamodb-storable

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

matthieuwerner/dynamodb-storable
================================

This component, based on the Symfony serializer and async-aws, is a human-readable andquick abstraction to easily store serialized objects in DynamoDB.

v0.1.0(3y ago)26MITPHPPHP &gt;=8.0

Since Jun 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/matthieuwerner/dynamodb-storable)[ Packagist](https://packagist.org/packages/matthieuwerner/dynamodb-storable)[ Docs](https://github.com/matthieuwerner/dynamodb-storable)[ Fund](https://www.paypal.me/matthieuwernerfr)[ GitHub Sponsors](https://github.com/matthieuwerner)[ RSS](/packages/matthieuwerner-dynamodb-storable/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

[![CI status](https://github.com/matthieuwerner/dynamodb-storable/actions/workflows/ci.yml/badge.svg)](https://github.com/matthieuwerner/dynamodb-storable/actions/workflows/ci.yml/badge.svg)

DynamoDB Storable
=================

[](#dynamodb-storable)

This component, based on the Symfony serializer and async-aws, is a human-readable and quick abstraction to easily store serialized objects in DynamoDB 🚀.

This storage use an existing DynamoDB table and create entries with the following structure : `{"key", "namespace", "value", "class", "date""}`.

- [DynamoDB Storable Interface](#dynamodb-storable-interface)
    - [Installation](#installation)
    - [Usage](#usage)
        - [Adding service](#adding-service)
            - [Option 1: auto wiring (Symfony/Laravel)](#option-1--auto-wiring--symfony-laravel-)
            - [Option 2: instantiate class](#option-2--instantiate-class)
        - [Write](#write)
        - [Read](#read)
        - [Remove](#remove)
        - [Working with namespaces](#working-with-namespaces)
        - [Changing default values](#changing-default-values)

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

[](#installation)

```
composer require matthieuwerner/dynamodb-storable
```

Usage
-----

[](#usage)

### Adding service

[](#adding-service)

#### Option 1: auto wiring (Symfony/Laravel)

[](#option-1-auto-wiring-symfonylaravel)

```
use Storable\Storage;

protected function anyAction(Storage $storage): string
{
    $storage->set('key', 'value');
    // ...
}
```

#### Option 2: instantiate class

[](#option-2-instantiate-class)

```
use Storable\Storage;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\Serializer;

protected function anyAction(): string
{
    $encoders = [new JsonEncoder()];
    $normalizers = [new ObjectNormalizer()];
    $storage = new Storage($dynamoDbClientMock, new Serializer($normalizers, $encoders));

    $storage->set('key', 'value');
    // ...
}
```

### Write

[](#write)

```
// String
$storage->set('key', 'value');

// Object
$myObject  = new MyObject();
$storage->setObject($myObject);
```

**/!\\ Working with objects need that they implement "StorableInterface"**

### Read

[](#read)

```
// String
$storage->get('key'); // Return a string

// Object
$storage->get($objectId); // Return an object
```

### Remove

[](#remove)

```
$storage->remove('key');
```

### Working with namespaces

[](#working-with-namespaces)

```
// Get all objects in a namespace
$storage->getByNamespace('namespace');

// Remove all objects in a namespace
$storage->removeNamespace('namespace');
```

### Changing default values

[](#changing-default-values)

```
// Change the default table name (default is "storage")
$storage->setTable('newTableName');

// Change the default namespace (default is "main")
$storage->setNamespace('newNamespaceName');

// Change the default attribute "key" in the table structure
$storage->setAttributeKey('newKeyAttribute');

// Change the default attribute "namespace" in the table structure
$storage->setAttributeNamespace('newNamespaceAttribute');

// Change the default attribute "value" in the table structure
$storage->setAttributeValue('newValueAttribute');

// Change the default attribute "class" in the table structure
$storage->setAttributeClass('newClassAttribute');

// Change the default attribute "date" in the table structure
$storage->setAttributeDate('newDateAttribute');
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

1420d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65e32aad82bbf32fae70978bdb947d827032bf73a8ea7313a68eb7d509c1422f?d=identicon)[matthieuwerner](/maintainers/matthieuwerner)

---

Top Contributors

[![matthieuwerner](https://avatars.githubusercontent.com/u/3184545?v=4)](https://github.com/matthieuwerner "matthieuwerner (3 commits)")

---

Tags

async-awsdynamodbkey-valuelaravelobjectserializerstorablestoragesymfonysymfonylaraveldynamodbserializerobjectasync-awsstorageKey valuestorable

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/matthieuwerner-dynamodb-storable/health.svg)

```
[![Health](https://phpackages.com/badges/matthieuwerner-dynamodb-storable/health.svg)](https://phpackages.com/packages/matthieuwerner-dynamodb-storable)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k48.1M234](/packages/api-platform-core)[unisharp/laravel-settings

Persistent settings manager for laravel, translations are supported.

107169.9k2](/packages/unisharp-laravel-settings)[api-platform/symfony

Symfony API Platform integration

323.2M67](/packages/api-platform-symfony)[api-platform/serializer

API Platform core Serializer

223.4M31](/packages/api-platform-serializer)[platinumpixs/aws-symfony2-bundle

A simple Symfony 2 bundle for including the AWS SDK for PHP.

1274.3k1](/packages/platinumpixs-aws-symfony2-bundle)

PHPackages © 2026

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