定制 mhthnz/yii2-tarantool 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mhthnz/yii2-tarantool

Composer 安装命令:

composer require mhthnz/yii2-tarantool

包简介

Tarantool connector for yii2 framework. Allows to perform SQL and NoSQL queries, ActiveRecord, Schemas and more.

README 文档

README

YiiFramework

Tarantool connector for yii2 framework

Latest Stable Version Latest Unstable Version Master Branch Tests Score Coverage

Tarantool connector for yii2 framework. Allows to perform SQL and NoSQL queries, framework abstractions such as ActiveRecord, Schema, TableSchema, Query, ActiveQuery and etc using tarantool database.

Documentation is here: docs/README.md

Check out yii2 basic tarantool application: https://github.com/mhthnz/yii2-basic-tarantool-app

Reqirements

Packagist PHP Version Support Tarantool version Yii2 version

If you are using php 7.1, try 1.0.6 version. Any later versions require php 7.2.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mhthnz/yii2-tarantool "*"

or add

"mhthnz/yii2-tarantool": "*"

to the require section of your composer.json file.

Configuration

return [
    'bootstrap' => ['debug'],
    'components' => [
        // Tarantool connection setup
        'tarantool' => [
            'class' => \mhthnz\tarantool\Connection::class,
            'dsn' => 'tcp://username:password@localhost:3301/?connect_timeout=5&max_retries=3',
        ],
    ],
    'modules' => [
        //Debug panel setup
        'debug' => [
            'class' => 'yii\debug\Module',
            'panels' => [
                'tarantool' => [
                    'class' => \mhthnz\tarantool\debug\TarantoolPanel::class,
                    'db' => 'tarantool', // Tarantool component id
                ],
            ],
            'allowedIPs' => ['127.0.0.1', '::1'],
        ],
    ],
];

Features

Future plans

  • Transactions
  • Connection slaves support
  • Queue

Running tests

  • First of all you need to run tarantool and bind it to localhost:3301
$ docker run --name mytarantool -p3301:3301 -d tarantool/tarantool:2.4.1
  • Install php deps
$ sudo apt install php7.3-mbstring php7.3-dom php7.3-intl # specify php version 
  • Install vendor
$ php composer install

$ php7.3 composer.phar install # or specify php version 
  • Run phpunit tests
$ php ./vendor/phpunit/phpunit/phpunit --bootstrap ./tests/_bootstrap.php --configuration ./phpunit.xml.dist 

统计信息

  • 总下载量: 1.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2021-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固