Code Monkey home page Code Monkey logo

yii2-tarantool's People

Contributors

arkhamvm avatar mhthnz avatar spywer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yii2-tarantool's Issues

MigrateController: Error with Tarantool 2.10.4

tarantool 2.8.2:

$ ./yii tarantool-migrate
Yii Migration Tool (based on Yii v2.0.44-dev)

No new migrations found. Your system is up-to-date.

tarantool 2.10.4:

$ ./yii tarantool-migrate
Yii Migration Tool (based on Yii v2.0.44-dev)

Exception 'Exception' with message 'At line 1 at or near position 63: keyword 'table' is reserved. Please use double quotes if 'table' is an identifier.
Failed to prepare SQL: select "format", "id", "engine" from "_space" where "name" = :table'

in /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php:231

Caused by: Exception 'Tarantool\Client\Exception\RequestFailed' with message 'At line 1 at or near position 63: keyword 'table' is reserved. Please use double quotes if 'table' is an identifier.'

in /var/www/project/vendor/tarantool/client/src/Exception/RequestFailed.php:32

Stack trace:
#0 /var/www/project/vendor/tarantool/client/src/Handler/DefaultHandler.php(48): Tarantool\Client\Exception\RequestFailed::fromErrorResponse()
#1 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(63): Tarantool\Client\Handler\DefaultHandler->handle()
#2 /var/www/project/vendor/mhthnz/yii2-tarantool/src/LastInsertIDMiddleware.php(43): Tarantool\Client\Handler\MiddlewareHandler->handle()
#3 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(69): mhthnz\tarantool\LastInsertIDMiddleware->process()
#4 /var/www/project/vendor/tarantool/client/src/Middleware/AuthenticationMiddleware.php(41): Tarantool\Client\Handler\MiddlewareHandler->handle()
#5 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(69): Tarantool\Client\Middleware\AuthenticationMiddleware->process()
#6 /var/www/project/vendor/tarantool/client/src/Middleware/RetryMiddleware.php(75): Tarantool\Client\Handler\MiddlewareHandler->handle()
#7 /var/www/project/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(69): Tarantool\Client\Middleware\RetryMiddleware->process()
#8 /var/www/project/vendor/tarantool/client/src/Client.php(221): Tarantool\Client\Handler\MiddlewareHandler->handle()
#9 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Client.php(218): Tarantool\Client\Client->prepare()
#10 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php(228): mhthnz\tarantool\Client->__call()
#11 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php(297): mhthnz\tarantool\Command->prepare()
#12 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Command.php(73): mhthnz\tarantool\Command->queryInternal()
#13 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Schema.php(148): mhthnz\tarantool\Command->queryOne()
#14 /var/www/project/vendor/yiisoft/yii2/db/Schema.php(758): mhthnz\tarantool\Schema->loadTableSchema()
#15 /var/www/project/vendor/mhthnz/yii2-tarantool/src/Schema.php(596): yii\db\Schema->getTableMetadata()
#16 /var/www/project/vendor/mhthnz/yii2-tarantool/src/console/MigrateController.php(114): mhthnz\tarantool\Schema->getTableSchema()
#17 /var/www/project/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(908): mhthnz\tarantool\console\MigrateController->getMigrationHistory()
#18 /var/www/project/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(183): yii\console\controllers\BaseMigrateController->getNewMigrations()
#19 [internal function]: yii\console\controllers\BaseMigrateController->actionUp()

Обновление зависимостей

Можно поднять версию https://github.com/tarantool-php/client до ^0.10.0 и https://github.com/tarantool-php/client до ^0.9.1 для улучшения совместимости с php 8.1+

"require": {
"php": "^7.2.5|^8",
"yiisoft/yii2": "~2.0.35",
"tarantool/client": "^0.10.0",
"rybakit/msgpack": "^0.9.1"
},

и внести изменения в файл src/Connection.php

Удалить строку: use MessagePack\TypeTransformer\BinTransformer;
Удалить строку: use MessagePack\TypeTransformer\CanPack;
Добавить строку: use MessagePack\TypeTransformer\StreamTransformer;

Удалить строку: return $clientClass::fromDsn($this->dsn, $this->getPacker([new BinTransformer()]))
Добавить строку: return $clientClass::fromDsn($this->dsn, $this->getPacker([new StreamTransformer()]))

Удалить строку: * @param array<int, CanPack> $transformers
Добавить строку: * @param array<int, StreamTransformer> $transformers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.