Download the PHP package craftcms/yii2-dynamodb without Composer
On this page you can find all versions of the php package craftcms/yii2-dynamodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-dynamodb
DynamoDB Cache, Session, and Queue for Yii 2
Easily use DynamoDB as a cache, session, or queue using this library in your Yii2 or Craft CMS projects.
Note: currently Craft supports Yii2 Queue version 2.3.0 so this package is based on version 2.3.0 of yii2-queue.
Installation
You can install the package via composer:
Usage
This package provides three Yii components for DynamoDB: cache, session, and queue.
Cache Component
Create DynamoDB Cache Table
Since DynamoDB is a NoSQL database, the only key you have to specify is the primary key. You can use the following AWS CLI command to generate a table for the cache.
Note: Since the ID can contain more than numbers, it needs to be specified as a string in DynamoDB.
Configure Cache Component
In your app.php
, configure the cache
component to use the driver.
Session Component
Create DynamoDB Session Table
Since DynamoDB is a NoSQL database, the only key you have to specify is the primary key. You can use the following AWS CLI command to generate a table for the session.
Note: Since the ID can contain more than numbers, it needs to be specified as a string in DynamoDB.
Configure Session Component
In your app.php
, configure the session
component to use the driver.
Queue Component
Create DynamoDB Queue Table
Since DynamoDB is a NoSQL database, the only key you have to specify is the primary key. You can use the following AWS CLI command to generate a table for the queue.
Note: Since the ID can contain more than numbers, it needs to be specified as a string in DynamoDB.
Configure Queue Component
In your app.php
, configure the queue
component to use the driver.
Testing
Tests run against local DynamoDB tables using Docker. To run tests, you must run the following:
- Ensure Docker is running
- Start the DynamoDB container in the
docker-compose.yaml
withdocker-compose up -d
- Create the DynamoDB tables for the queue
- Run the test suite with
vendor/bin/phpunit --testdox
To make the setup and testing easier, you can run the following Composer scripts:
composer run setup
composer run test
Credits
- Jason McCallister
- Tim Kelty
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of yii2-dynamodb with dependencies
ext-json Version *
yiisoft/yii2 Version ^2.0.45
yiisoft/yii2-queue Version ^2.3.2