The DynamoPHP Symfony Bundle integrates DynamoPHP into Symfony applications, providing seamless configuration and service registration for Amazon DynamoDB operations.
- Auto-wiring of DynamoPHP services
- Configurable AWS SDK DynamoDB client and Marshaler
- Symfony Flex recipe support for automatic configuration
- Sandbox application for testing and development
Install via Composer:
composer require edumarques/dynamophp-symfony
Ensure that your Symfony application is configured to use Symfony Flex for automatic bundle registration and configuration.
Note: this is an optional step. By default, the bundle assumes DynamoDBClient and Marshaler services are already registered in the application DI container.
After installation, you can configure the bundle by creating a dynamo_php.yaml
file in your config/packages/
directory:
# config/packages/dynamo_php.yaml
dynamo_php:
client:
region: 'us-east-1'
version: 'latest'
# Add DynamoDB client configuration options here
marshaler:
# Add Marshaler configuration options here
Adjust the client and marshaler settings according to your AWS DynamoDB setup and application requirements.
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
}
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: [email protected].
For more information on DynamoPHP, visit the DynamoPHP repository.