edumarques/dynamophp-symfony

Symfony bundle that wraps DynamoPHP and simplifies development on Symfony applications.

v0.6.0 2025-05-18 13:49 UTC

This package is auto-updated.

Last update: 2025-06-18 14:04:18 UTC


README

PHP Version License Build Status

The DynamoPHP Symfony Bundle integrates DynamoPHP into Symfony applications, providing seamless configuration and service registration for Amazon DynamoDB operations.

Features

  • Auto-wiring of DynamoPHP services
  • Configurable AWS SDK DynamoDB client, Marshaler and Serializer
  • Sandbox application for testing and development

Installation

Install via Composer:

composer require edumarques/dynamophp-symfony

If your Symfony application is not configured to use Symfony Flex for automatic bundle registration, you need to register it manually in config/bundles.php:

# config/bundles.php
return [
    // ... other bundles
    EduardoMarques\DynamoPHPBundle\DynamoPHPBundle::class => ['all' => true],
];

Configuration

After installation, you must configure the bundle by creating a dynamo_php.yaml file in your config/packages/ directory:

# config/packages/dynamo_php.yaml
dynamo_php:
  client: dynamodb_client # set the service ID of the AWS DynamoDB client registered in your app
  marshaler: marshaler # set the service ID of the AWS Marshaler registered in your app
  serializer: serializer # set the service ID of the Symfony serializer registered in your app

Usage

Once configured, you can inject DynamoPHP services into your Symfony services or controllers. For example, to use the EntityManager:

use EduardoMarques\DynamoPHP\ODM\EntityManager;

class YourService
{
    public function __construct(
        private EntityManager $entityManager,
    ) {
    }

    // Your methods here
}

Contributing

Contributors are always welcome! For more information on how you can contribute, please read our contribution guideline.

For any questions, feel free to reach out to me directly by email: eduardomarqs1@gmail.com.

For more information on DynamoPHP, visit the DynamoPHP repository.