tarantool-php / client Goto Github PK
View Code? Open in Web Editor NEWPHP client for Tarantool.
License: MIT License
PHP client for Tarantool.
License: MIT License
I use this code to calculate something in lua grouped by integer key
var_dump($client->evaluate('
local result = {}
result[8] = 15
return result
')->getData());
Running the code will provide this result.
Please note that index was decreased by one.
array(1) {
[0]=>
array(8) {
[0]=>
NULL
[1]=>
NULL
[2]=>
NULL
[3]=>
NULL
[4]=>
NULL
[5]=>
NULL
[6]=>
NULL
[7]=>
int(15)
}
}
I found workaround - initialize with non-integer key, so the result keeps good:
var_dump($client->evaluate('
local result = {_ = 0}
result[8] = 15
return result
')->getData());
This way i see expected result.
array(1) {
[0]=>
array(2) {
[8]=>
int(15)
["_"]=>
int(0)
}
}
Maybe there is a way to keep it working without any workaround?
For example, change indexes only when all keys are integer, goes one by one and last equals table size.
I created a space when I started the server:
space = box.schema.space.create('example')
space:create_index('primary', {type = 'tree', parts = {1, 'unsigned'}})
space:create_index('secondary', {type = 'tree', unique = false, parts = {2, 'str'}})
space:insert({1, 'foo'})
Data manipulation works correctly with Space
query methods:
$space = $client->getSpace('example');
echo \json_encode($space->select(Criteria::key([1])));
But any use of the executeQuery
method in SQL
generates a Fatal error:
$res=$client->executeQuery('SELECT * FROM example');
Fatal error: Uncaught Tarantool\Client\Exception\RequestFailed: Unknown request type 11 in RequestFailed.php:23 Stack trace: #0 /Handler/DefaultHandler.php(47): RequestFailed::fromErrorResponse(Object(Tarantool\Client\response))
executeUpdate
method generates the same error:
$result1 = $client->executeUpdate('
CREATE TABLE users ("id" INTEGER PRIMARY KEY AUTOINCREMENT, "email" VARCHAR(255))
');
I must have missed something somewhere.
Ref: jakubkulhan/bunny#41
I try to use next way
$conn = new StreamConnection('tcp://' . env('TARANTOOL_HOST') . ':' . env('TARANTOOL_PORT'));
$packer = new PurePacker();
$client = new Client($conn, $packer);
$client->evaluate('box.cfg()');
$client->evaluate('box.sql.execute([[CREATE TABLE table1 (column1 INTEGER PRIMARY KEY, column2 VARCHAR(100));]])');
$client->evaluate('box.sql.execute([[INSERT INTO table1 VALUES (1, \'A\');]])');
$result = $client->evaluate('box.sql.execute([[SELECT * FROM table1;]])');
var_dump($result->getData());
As I see in Tarantool console, data was created:
tarantool> select * from table1;
---
- - [1, 'A']
...
But result in PHP is empty:
/var/www/cup-backend/app/Http/Controllers/Test/TarantoolController.php:26:
array (size=0)
empty
What is wrong?
Использует ли кто-нибудь данный пакет в продакшен?
Есть конечно официальный пакет https://github.com/tarantool/tarantool-php
Но он не работает пока на php7.
A library user occasionally sees the "Space 'X' does not exist" exception, and this only happens under load. The configuration they use:
Client::fromOptions([
'uri' => "tcp://{$host}:{$settings['tarantool']['port']}",
'username' => $settings['tarantool']['username'],
'password' => $settings['tarantool']['password'],
'tcp_nodelay' => true,
'persistent' => true,
'connect_timeout' => 20,
'socket_timeout' => 20,
])->withMiddleware(
RetryMiddleware::linear()
);
[[$id, $money]] = $space->select(Ctiteria::key([42]));
Ctiteria -> Criteria
Its as simple as this, in php
$mysql = new Tarantool('127.0.0.101', 3301,'guest');
$val = $mysql->select('table',8);
I am expecting to get at least 60k req/s if I use c/c++ (async not compatible with http = 1 http req+hugely multiple database req), but In php only got 900 req/s (1http req+1database req). If I use mysql in pool mode in php (1http req+1database req), I can get around 6k req/s. So with tarantool-php its about 6x slower.
However, database usage performance on mysql vs tarantool, tarantool wins hands down (even when conditions are the same like: number of request processed+size of database)
What I can consider as "not slow" is if, tarantool-php can achieve around 60k req/s if impossible, maybe faster than mysql. I tried to use pool for tarantool-php but there is no improvement.
Hello.
In our projects we use Your library for connect to Tarantool.
Would be great if select function return associative array.
At the moment in our cases we have something like this:
$result = $client()->getSpace('test_space')->select(Criteria::key([1]));
print_r($result);
/*
Array
(
[0] => Array
(
[0] => 1
[1] => Test
[2] => Test
[3] => https://www.google.com/
[4] => 1
[5] => 0
[6] => 1
[7] => 2
[8] => 1
[9] => 1
[10] => 1
)
)
*/
After that we associate index number with field name for comfort and easy usage in our code.
Proposal:
For more comfort usage, adding boolean parameter $associative with default value => false to select function.
$result = $client()->getSpace('test_space')->select(Criteria::key([1]), true);
print_r($result);
/*
Array
(
[0] => Array
(
[field_1] => 1
[field_2] => Test
[field_3] => Test
[field_4] => https://www.google.com/
[field_5] => 1
[field_6] => 0
[field_7] => 1
[field_8] => 2
[field_9] => 1
[field_10] => 1
[field_11] => 1
)
)
*/
Thanks!
Hello, when using SELECT query is it possible for you to code to the iterator only returns the first array instead of an array with an subarray to the found row?
I want to make it simple and do this (when only 1 row is found )
echo $person['name']
Instead of
echo $person[0]['name']
Regards
There are an error while unpacking authentificate response:
PHP Fatal error: Cannot use object of type stdClass as array in ***/vendor/tarantool/client/src/Packer/PeclLitePacker.php on line 53
PeclPacker (not Lite) works fine.
PHP 5.6.19 (cli) (built: Mar 3 2016 08:05:32)
tarantool/client v0.1.0
Please, say, can I insert many rows in a one transaction.
Hi!
Can you push tag v0.5.3 from current master with persistent connections so I could add it to my composer? :)
Now when I do install I get 0.5.2 version without persistent connections :(
ps: maybe I am doing something wrong because I am total php noob)
For compatibility reasons with other DBMS, I had to create a Tarantool Statement.
The statement is prepared from an SQL instruction.
We can bind parameters to it, and then retrieve the data.
In particular, I need a method that returns each line of the result as an associative array of field names and values (the equivalent of FETCH_ASSOC
mode in PDO
with fetch
or fetchAll
).
But with SqlQueryResult
, data and metadata are separated. I am therefore forced to perform a processing operation to group them together.
I'm retrieving the field names:
$this->queryResult
is an instance of SqlQueryResult
.
protected function getFields()
{
$metas=$this->queryResult->getMetadata();
$result=[];
foreach ($metas as $meta){
$result[]=\current($meta);
}
return $result;
}
I associate them with the data:
protected function getDatas(){
$datas=$this->queryResult->getData();
$fields=$this->getFields();
$result=[];
foreach ($datas as $row){
$resultRow=[];
foreach ($row as $index=>$value){
$resultRow[$fields[$index]]=$value;
}
$result[]=$resultRow;
}
return $result;
}
array (size=2)
0 =>
array (size=2)
'id' => int 1
'name' => string 'foo' (length=3)
1 =>
array (size=2)
'id' => int 2
'name' => string 'bar' (length=3)
It works fine. But I wonder if there's not another way to do that, less expensive for performance.
Hello, I one more question from me :)
Is 'SYN' checked somehow? How do we ensure that the request returned from Tarantool is returned for the client requested it?
I could not find code that checks this kind of behavior. Thanks in advance!
Hi,
I wonder if it is possible to bind parameters to a query through LUA calls.
I have this query working with php-client:
$result = $client->executeUpdate("UPDATE {$this->table} SET expire_at = 0 WHERE resource_key = ? AND token = ? AND expire_at >= ?", $resource, $token, $expire_at);
and I would actually like to run this query in a LUA procedure instead, something like:
//this param might not be the ideal but it is just an example:
$params = ['table' => 'key_locks', 'sql'=> 'UPDATE ? SET expire_at = 0 WHERE resource_key = ? AND token = ? AND expire_at >= ?', 'bind' = ['resource_key' => $resource, 'token' => $token, 'expire_at' => $expire_at]]
$result = $client->evaluate(
<<<LUA
box.execute([[UPDATE ? SET expire_at = 0 WHERE resource_key = ? AND token = ? AND expire_at >= ?; ]])
return 'success!'
LUA
, $params);
How can I output the sql string and the params to the LUA code with its bindings?
Thanks
I try to get space names from a php Client.
I saw that the Client class contained a private member $spaces
, and that it was possible to access a space by its id (getSpaceById
) or by name (getSpaceByName
), but there is no accessor to $spaces
...
What is the best way to get a list of Spaces names ?
With Lua mode ?
$spaces = $client->evaluate ( 'box.space._space' );
or with SQL?
$spaces = $client->executeQuery( 'SELECT name FROM _space' )->getData();
or in another way?
There is configuration option "socket_timeout" if request takes more time exception is thrown. It will be good to change message from "Unable to read response length." to "Request timed out".
I think this message is better than current one.
I use PHP 5.3.3 and would prefer a client as a standalone class (without composer).
I assume that alot of people would agree with me.
Exceptions doesn't display full trace. It's hard to understand which code throws the exception.
Try to run:
require_once __DIR__.'/vendor/autoload.php';
$client = \Tarantool\Client\Client::fromOptions([
'uri' => 'tcp://127.0.0.1:3301',
'username' => 'admin',
'password' => 'pass'
]);
$client->evaluate("box.schema.space.create('test')");
$client->evaluate("box.space.test:format({
{name = 'hash', type = 'string'}
})");
$client->evaluate("box.space.test:create_index('primary', {
type = 'hash',
parts = {'hash'}
})");
$space = $client->getSpace('test');
$space->insert(['info']);
$space->insert(['info']);
You will receive:
PHP Fatal error: Uncaught Tarantool\Client\Exception\RequestFailed: Duplicate key exists in unique index "primary" in space "test" with old tuple - ["info"] and new tuple - ["info"] in /var/www/vendor/tarantool/client/src/Exception/RequestFailed.php:32
Stack trace:
#0 /var/www/vendor/tarantool/client/src/Handler/DefaultHandler.php(48): Tarantool\Client\Exception\RequestFailed::fromErrorResponse(Object(Tarantool\Client\Response))
#1 /var/www/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(76): Tarantool\Client\Handler\DefaultHandler->handle(Object(Tarantool\Client\Request\InsertRequest))
#2 /var/www/vendor/tarantool/client/src/Middleware/AuthenticationMiddleware.php(41): Tarantool\Client\Handler\MiddlewareHandler->handle(Object(Tarantool\Client\Request\InsertRequest))
#3 /var/www/vendor/tarantool/client/src/Handler/MiddlewareHandler.php(82): Tarantool\Client\Middleware\AuthenticationMiddleware->process(Object(Tarantool\Client\Request\InsertRequest), Object(Tarantool\Client\Handler\M in /var/www/vendor/tarantool/client/src/Exception/RequestFailed.php on line 32
There is no information about the row $space->insert(['info']);
which causes the error. I wanna see full trace log in debug message.
Hello,
Not sure if it's correct place to post the issue, however I will try.
I've following:
Environment
Code
use \Tarantool\Client\{ Client };
$client = Client::fromOptions([
'uri' => 'tcp://tarantool:3301',
'username' => 'mydebug',
'password' => 'mypassword1!',
]);
$result = $client->executeUpdate('
CREATE TABLE users ("id" INTEGER PRIMARY KEY AUTOINCREMENT, "email" VARCHAR(255))
');
var_dump($result);
Result
[Tarantool\Client\Exception\RequestFailed]
lid MsgPack - packet body (20)
Tarantool
2019-05-31 11:04:12.157 [1] iproto iproto.cc:737 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet length
2019-05-31 11:04:14.953 [1] iproto xrow.c:174 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet body
2019-05-31 11:04:16.262 [1] iproto xrow.c:166 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet body
2019-05-31 11:04:17.874 [1] iproto xrow.c:174 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet body
2019-05-31 11:04:19.223 [1] iproto xrow.c:166 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet body
2019-05-31 11:09:38.632 [1] iproto xrow.c:166 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet body
2019-05-31 11:09:38.632 [1] iproto iproto.cc:737 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet length
2019-05-31 11:09:54.434 [1] iproto xrow.c:166 E> ER_INVALID_MSGPACK: Invalid MsgPack - packet body
2019-05-31 11:14:30.
Any ideas or suggestions how to debug or fix it?
Thank you.
It would be nice to add a method that allows space truncation. Is there any chance this request type would be implemented?
Tarantool 1.7.1 adds a new implementation of CALL command which supports EVAL-style marshalling, i.e. returned data is not converted to tuples anymore. Old CALL command (code = 6) is deprecated.
Please detect Tarantool version on connect and use code=10 for CALL if remote version >= 1.7.1.
This will simplify the installation of the client and avoid potential incompatibility issues when installing the rybakit/msgpack
library. The ability to use the msgpack pecl extension will still remain, but it will have to be done explicitly by passing the pecl packer as an argument to the client's factory methods (instead of checking availability at runtime). The PackerFactory
class will be removed.
Ubiquity-tarantool is almost operational, but there are certainly some adjustments to be made.
I performed some benchmarks using Techempower's multiple database queries test on my own servers, to appreciate the difference with pdo/mysql.
Ubiquity-Tarantool
is 9 times faster than Ubiquity-pdo
.I performed benchmarks without Ubiquity, to appreciate the difference in reading between Tarantool and pdo/mysql.
Reading of 20 rows on a table of 10,000 rows (php is pdo/mysql):
The difference is even greater than with Ubiquity, which is partly explained by:
#!/usr/bin/env tarantool
-- Configure database
box.cfg {
listen = 3302,
background = true,
log = '2.log',
pid_file = '2.pid'
}
box.once("bootstrap", function()
space = box.schema.space.create('world', {engine='vinyl'})
space:format({
{name = 'id', type = 'unsigned'},
{name = 'randomNumber', type = 'string'}
})
box.schema.sequence.create('S',{min=1, start=1})
space:create_index('primary', {
type = 'tree',
parts = {'id'},
sequence= 'S'
})
box.schema.user.grant('guest', 'read,write,execute', 'space', 'world')
end)
\header('Content-type: application/json');
require_once 'vendor/autoload.php';
// Database connection
$client = \Tarantool\Client\Client::fromDsn ( 'tcp://127.0.0.1:3302' );
// Read number of queries to run from URL parameter
$query_count = 1;
if ($_GET['queries'] > 1) {
$query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
}
// Create an array with the response string.
$arr = [];
// For each query, store the result set values in the response array
while (0 < $query_count--) {
$query=$client->executeQuery('SELECT "id","randomNumber" FROM "world" WHERE "id" = ? limit 1', \mt_rand(1, 10000));
// Store result in array.
$arr[] = $query->getFirst();
}
// Use the PHP standard JSON encoder.
// http://www.php.net/manual/en/function.json-encode.php
echo \json_encode($arr);
\header('Content-type: application/json');
// Database connection
// http://www.php.net/manual/en/ref.pdo-mysql.php
$client = new \PDO('mysql:host=127.0.0.1;dbname=hello_world', 'userxxx', 'passwordxxx', [
\PDO::ATTR_PERSISTENT => true,
\PDO::ATTR_EMULATE_PREPARES => false
]);
// Read number of queries to run from URL parameter
$query_count = 1;
if ($_GET['queries'] > 1) {
$query_count = $_GET['queries'] > 500 ? 500 : $_GET['queries'];
}
// Create an array with the response string.
$arr = [];
// Define query
$statement = $client->prepare('SELECT id,randomNumber FROM World WHERE id = ?');
// For each query, store the result set values in the response array
while (0 < $query_count--) {
$statement->execute( [mt_rand(1, 10000)] );
// Store result in array.
$arr[] = $statement->fetch(PDO::FETCH_ASSOC);
}
// Use the PHP standard JSON encoder.
// http://www.php.net/manual/en/function.json-encode.php
echo \json_encode($arr);
I'm detect some interest case:
Create example space:
uuid = require('uuid')
local space = box.schema.space.create('example')
space:create_index('primary', {type = 'tree', parts = {1, 'unsigned'}})
space:format({
{name = 'id', type = 'unsigned'},
{name = 'uuid_field', type = 'uuid'},
{name = 'ts', type = 'unsigned'}
})
space:insert({1, uuid.fromstr('f0fcc1c2-1740-4275-abdc-40ad5df53785'), 1638452366})
Get data by binary protocol:
$result = $client()->getSpace('example')->select(Criteria::key([$id]));
var_dump($result);
Array
(
[0] => Array
(
[0] => 1
[1] => Symfony\Component\Uid\UuidV4 Object
(
[uid:protected] => f0fcc1c2-1740-4275-abdc-40ad5df53785
)
[2] => 1638452366
)
)
Get data by SQL protocol:
$result = $client()->executeQuery('select * from "example" where "id" = ?', $id);
var_dump($result);
Tarantool\Client\SqlQueryResult Object
(
[data:Tarantool\Client\SqlQueryResult:private] => Array
(
[0] => Array
(
[0] => 1
[1] => �������@Bu��@�]�7�
[2] => 1638452366
)
)
[metadata:Tarantool\Client\SqlQueryResult:private] => Array
(
[0] => Array
(
[0] => id
[1] => unsigned
)
[1] => Array
(
[0] => uuid_field
[1] => uuid
)
[2] => Array
(
[0] => ts
[1] => unsigned
)
)
[keys:Tarantool\Client\SqlQueryResult:private] => Array
(
[0] => id
[1] => uuid_field
[2] => ts
)
)
The field value uuid_field looks like a set of random characters.
I think it's a bug.
I read that there is no information_schema
table in Tarantool (see https://www.tarantool.io/en/doc/2.2/book/sql/).
So I tried to make a method returning the names of the fields included in the primary key:
I would like to ask for the advice of specialists.
$this->client
is an instance of Client
public function getPrimaryKeys($spaceName)
{
$idSpace = $this->getSpaceIdByName ( $spaceName );
$indexesInfos = $this->client->getSpaceById ( Space::VINDEX_ID )->select ( Criteria::key ( [ $idSpace ] ) );
$fieldsInfos = $this->client->getSpaceById ( Space::VSPACE_ID )->select ( Criteria::key ( [ $idSpace ] ) ) [0] [6];
$pks = [ ];
if ([ ] !== $fieldsInfos && ($firstIndex = \current ( $indexesInfos ))) {
$indexedfields = $firstIndex [5];
foreach ( $indexedfields as $field ) {
$fieldNum = $field ['field'];
if (isset ( $fieldsInfos [$fieldNum] )) {
$pks [] = $fieldsInfos [$fieldNum] ['name'];
}
}
}
return $pks;
}
I tested with some spaces (without pk, and pk with 1 or more fields). It seems to work, but sometimes chance does things right (or wrong).
What bothers me a little bit is the use of numerical indexes for arrays, it would be better to use named constants, these values may be referenced somewhere?
Ref: #6
Hi,
I wonder if it is possible to use the Tarantool php-client with the queue system and if so can you please provide an example ?
Regards
Hi,
I have a question and that is do you do anything to prevent SQL injections ?
I wanted to use the PDO bindparams but it seems that it is specifically bounded to mySQL.
Perhaps taking that method and implementing it in this package would be good?
Any feedback is appreciated.
regards
Hi, guys!
Is there a specific method to create a space and indexes.
E.g. $client->createSpace('some-space')
;
When I call getSpace
on non-existent space, I get Tarantool\Client\Exception\RequestFailed: Space 'some-space' does not exist
;
PHP 5.6.30-1~dotdeb+7.1 (cli) (built: Jan 21 2017 14:50:59)
Tarantool 1.7.4 (Binary) bba87e42-c93f-4823-a51a-36069400f80f
PHP module compiled from github repo
Server script looks like:
box.cfg {
listen = 3301,
background = true,
log = 'deploy.log',
pid_file = 'deploy.pid'
}
space = box.space.deploy
if not space then
space = box.schema.create_space('deploy')
space:create_index('primary', { parts = {1, 'STR'}, type='HASH' })
end
Attempt to execute following code:
$tt = new Tarantool("127.0.0.1",3301);
var_dump($tt->select('deploy'));
failed with "Uncaught exception 'Exception' with message 'No space 'deploy' defined'"
At the same time console call box.space.deploy returns
---
- index:
0: &0
unique: true
parts:
- type: string
fieldno: 1
id: 0
space_id: 512
name: primary
type: HASH
primary: *0
on_replace: 'function: 0x4174bab8'
temporary: false
id: 512
engine: memtx
enabled: true
name: deploy
field_count: 0
Hi,
Thank you for your work.
I read conversation from groups.google.com and I was waiting for reactphp client, but I don't find it on github.
Can I get access to reactphp client ?
3.1) Will it be open sourced ?
Thank you.
Hi,
is it possible to add Methods such as findOrFail, saveOrFail, updateOrFail etc to this great plugin ?
Regards
$conn = new StreamConnection('tcp://127.0.0.1:3301', [
'username' => 'username',
'password' => 'password',
]);
$client = new Client($conn, new PurePacker());
$conn = new StreamConnection('tcp://127.0.0.1:3301');
$client = new Client($conn, new PurePacker(), [
'username' => 'username',
'password' => 'password',
]);
$conn = new StreamConnection('tcp://127.0.0.1:3301');
$client = new Client($conn, new PurePacker());
$client->setCredentials('username', 'password'); // <- lazy
$client->authenticate('username', 'password'); // <- non-lazy
Hi, I use the next command to connect on tarantool-server in docker:
docker exec -i -t my_tarantool_1 console
But I need to connect on remote server, please help me.
Hi,
it seems that the docs or guide regarding using SELECT doesnt return the column names, instead it is an array with integer indexes.
$result3 = $client->executeQuery('SELECT * FROM users WHERE email = ?', '[email protected]'); printf("Result 3: %s\n", json_encode(iterator_to_array($result3)));
So the code above gives me:
Result 3: [{"0":1,"[email protected]"}]
Instead of
Result 3: [{"ID":1,"EMAIL":"[email protected]"}]
Thanks if you can fix this.
It would be nice to add some more docs on how to use the client. I.e.: what parameters should be passed to upsert method. Personally I have not found proper way to upsert data
Мы недавно обновили версию tarantool до 2.2 и также обновили php-client до 0.6. После этого апдейта периодически начали всплывать такие ошибки. Можете, пожалуйста, помочь с этим вопросом, так и не разобрались из за чего она. В клиентском коде, идет проверка на существование записи а потом непосредственно сама запись в базу.
Настройки инстанса тарантула
box.cfg {
listen = config.tarantool.port;
background = true;
work_dir = dirLog;
io_collect_interval = nil;
readahead = 16320;
memtx_memory = 2048 * 1024 * 1024; -- 2GB
memtx_min_tuple_size = 16;
memtx_max_tuple_size = 1 * 1024 * 1024; -- 1Mb
vinyl_memory = 128 * 1024 * 1024; -- 128Mb
vinyl_cache = 128 * 1024 * 1024; -- 128Mb
wal_mode = "fsync";
wal_max_size = 256 * 1024 * 1024;
checkpoint_interval = 60 * 60; -- one hour
checkpoint_count = 6;
snap_io_rate_limit = nil;
force_recovery = true;
log_level = 5;
too_long_threshold = 0.5;
log = dirLog .. 'logs.log';
pid_file = dirLog .. 'tarantool.pid';
}
в логах тарантула
2019-11-15 13:56:49.705 [29611] main txn.c:446 W> too long WAL write: 1 rows at LSN 1609493: 0.565 sec
Please add upsert request support https://tarantool.org/doc/1.7/book/box/box_space.html?highlight=upsert?highlight=upsert#lua-function.space_object.upsert
Hi,
Thanks for a great plugin.
Is it possible to have an option or make it default for column names to lower case or case insensitive?
Regards
Please update README.md so it show how to use PurePacker()
e.g.:
$client = new Client($conn, new PurePacker()); // composer require rybakit/msgpack:@dev
Add iterator types constants.
Example: https://github.com/tarantool/tarantool-php#predefined-constants
Maybe, they should be placed in any given class:
Example of failures:
Runtime: PHP 7.4.29
Configuration: /client/phpunit.xml.dist
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
............................................................... 63 / 511 ( 12%)
............................................................... 126 / 511 ( 24%)
............................................................... 189 / 511 ( 36%)
............................................................... 252 / 511 ( 49%)
..............................................EE............... 315 / 511 ( 61%)
.........................................................EEEEEE 378 / 511 ( 73%)
EEEEEEEEEEEEEEEEEEE..............SSSEEE.......................E 441 / 511 ( 86%)
EEEEEEEEEEEEE.................EEEEEEE.......................... 504 / 511 ( 98%)
....... 511 / 511 (100%)
Time: 00:07.598, Memory: 20.00 MB
There were 51 errors:
1) Tarantool\Client\Tests\Integration\BoxErrorTest::testExceptionWithErrorIsThrown
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:44
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
2) Tarantool\Client\Tests\Integration\BoxErrorTest::testExceptionWithNestedErrorIsThrown
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:44
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
3) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testBinarySelectByDecimalKeySucceeds
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
4) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testSqlSelectByDecimalKeySucceeds
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
5) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #0 ('0')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
6) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #1 ('-0')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
7) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #2 ('42')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
8) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #3 ('-127')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
9) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #4 ('0.0')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
10) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #5 ('00000.0000000')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
11) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #6 ('00009.9000000')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
12) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #7 ('1.000000099')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
13) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #8 ('4.2')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
14) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #9 ('1E-10')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
15) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #10 ('-2E-15')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
16) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #11 ('0.0000234')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
17) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #12 ('99999999999999999999999999999999999999')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
18) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #13 ('-9999999999999999999999999999...999999')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
19) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #14 ('0.111111111111111111111111111...111111')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
20) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #15 ('11111111111111111111111111111...1111.0')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
21) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #16 ('9.999999999999999999999999999...999999')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
22) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testLuaPackingAndUnpacking with data set #17 ('99999999999999999999999999999...9999.9')
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
23) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testBigIntegerUnpacksToDecimal
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
24) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testPurePackerUnpacksBigIntToDecimal with data set #0 (Tarantool\Client\Packer\PurePacker Object (...))
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
25) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testPurePackerUnpacksBigIntToDecimal with data set #1 (Tarantool\Client\Packer\PurePacker Object (...))
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
26) Tarantool\Client\Tests\Integration\MessagePack\DecimalExtensionTest::testPurePackerUnpacksBigIntToDecimal with data set #2 (Tarantool\Client\Packer\PurePacker Object (...))
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
27) Tarantool\Client\Tests\Integration\MessagePack\ErrorExtensionTest::testLuaPackingAndUnpacking
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:44
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
28) Tarantool\Client\Tests\Integration\MessagePack\UuidExtensionTest::testBinarySelectByUuidKeySucceeds
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
29) Tarantool\Client\Tests\Integration\MessagePack\UuidExtensionTest::testSqlSelectByUuidKeySucceeds
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
30) Tarantool\Client\Tests\Integration\MessagePack\UuidExtensionTest::testLuaPackingAndUnpacking
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
31) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteInsertsRows
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
32) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteFetchesAllRows
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
33) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteUpdateInsertsRows
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
34) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteUpdateInsertsRowsWithAutoIncrementedIds
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
35) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteUpdateUpdatesRow
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
36) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryFetchesAllRows
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
37) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryFetchesOneRow
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
38) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryFetchesNoRows
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
39) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryBindsPositionalParameters
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
40) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryBindsNamedParameters
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
41) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryBindsMixedParameters
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
42) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testExecuteQueryBindsMixedParametersAndSubstitutesPositionalOnes
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
43) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testSqlQueryResultHoldsMetadata
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
44) Tarantool\Client\Tests\Integration\Requests\ExecuteTest::testSqlQueryResultHoldsExtendedMetadata
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
45) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testPreparePreparesSqlStatement
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
46) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testExecuteQueryReturnsResult
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
47) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testExecuteUpdateUpdatesRows
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
48) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testCloseDeallocatesPreparedStatement
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
49) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testCloseDeallocatesPreparedInLuaSqlStatement
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
50) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testCloseFailsOnNonexistentPreparedStatement
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
51) Tarantool\Client\Tests\Integration\Requests\PrepareTest::testPrepareResetsPreviouslyBoundParameters
UnexpectedValueException: Invalid version string "2.11.0-entrypoint.3"
/client/vendor/tarantool/phpunit-extras/src/Annotation/Requirement/TarantoolVersionRequirement.php:42
/client/vendor/rybakit/phpunit-extras/src/Annotation/Processor/RequiresProcessor.php:72
/client/vendor/rybakit/phpunit-extras/src/Annotation/AnnotationProcessor.php:43
/client/vendor/rybakit/phpunit-extras/src/Annotation/Annotations.php:39
/client/vendor/rybakit/phpunit-extras/src/TestCase.php:37
phpvfscomposer:///client/vendor/phpunit/phpunit/phpunit:97
Do you think it's possible to make use of persistent connections with this library for better performance and to prevent resource exhaustion? I made symfony 4 controller which only reads value from tarantool, and as I benchmark it it's performance over time degrades from over 1500 to some 400 req/s, and as some point it begins to error out with Uncaught PHP Exception Tarantool\Client\Exception\ConnectionFailed: "Failed to connect to tcp://127.0.0.1:3301: Cannot assign requested address.
.
I tried to pass STREAM_CLIENT_PERSISTENT
to stream_socket_client
, but then it just can't read greetings anymore after first request.
Hi!
I have some cache
space with one indexable field (key). By example:
local cache = box.schema.create_space('cache')
cache:format({
{name = 'key', type = 'string'},
})
cache:create_index('primary', {
type = 'hash',
parts = {{'key'}}
})
And I want replace some data:
$this->tarantool->getSpace('cache')->replace(['token:dcf59f14-0275-11e7-86fa-f7d003c26803', ['data' => ['foo' => 'bar']], 1563485380]);
After calling I see this exception:
Type: Tarantool\Client\Exception\RequestDenied
Message: Request "Tarantool\Client\Request\ReplaceRequest" is denied.
File: /path/to/vendor/tarantool/client/src/Exception/RequestDenied.php
Line: 22
But that works in Lua:
box.space.cache:replace({'token:dcf59f14-0275-11e7-86fa-f7d003c26803', { data =
{foo = 'bar'} }, 1563485380});
---
- ['token:dcf59f14-0275-11e7-86fa-f7d003c26803', {'data': {'foo': 'bar'}},
1563485380]
...
Thanks for your work!
Response should be read in a loop like this:
while(($buf = socket_read($socket, 512)) !== false) {
$data .= $buf;
if (strlen($data) === $expected_length){
break;
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.