2016-03-24 6 views
0

PHPライブラリーhttps://github.com/tarantool-php/queueがありますが、ext-tarantoolが必要です。純粋にphpで書かれたアクティブな保守可能なライブラリーがあるので、php 5.6または7のtarantoolキューを使用できますか? phos5.6用にext-tarantoolをインストールするためのCentOS用の準備ができているパッケージはありますか? yum install php-tarantoolは、私がtarantool-PHP /キューライブラリの作者だ、次の非互換性エラーにどのように私はPHPでtarantoolのキューを使用できますか?

Error: Package: php-tarantool-0.1.0-19.el6.x86_64 (tarantool_1_6) 
      Requires: php(zend-abi) = 20090626 
      Installed: php-common-5.6.19-1.el6.remi.x86_64 (@remi-php56) 
       php(zend-abi) = 20131226-64 
+0

AFAIK、このパッケージにはリポジトリがありません。 "remi-php56"からphpを使用している場合は、https://github.com/remicollet/remirepoでリポジトリにこの拡張子を追加することを尋ねる必要があります –

+0

私たちの問題を解決するremiリポジトリに新しいパッケージがありますphp-tarantool .x86_64 0:0.1.0-1.el6.remi.5.6 –

答えて

1

を与えます。私は将来的にthe pure PHP Tarantool clientのサポートを追加するつもりですが、それはまだありません。

use Tarantool\Client; 

class Tarantool 
{ 
    private $client; 

    public function __construct(Client $client) 
    { 
     $this->client = $client; 
    } 

    public function call($functionName, array $args = null) 
    { 
     $result = $this->client->call($functionName, $args ? $args : []); 

     return $result->getData(); 
    } 
} 

そして、このようにそれを使用します:

、一方で

)回避策として、あなたは、\Tarantoolクラスで例えばTarantool\Clientを飾ることができます。そのためにチケットを提出して自由に記入

use Tarantool\Client; 
use Tarantool\Connection\SocketConnection; 
use Tarantool\Packer\PurePacker; 
use Tarantool\Queue\Queue; 

$client = new Client(new SocketConnection(), new PurePacker()); 
$client = new Tarantool($client); 

$queue = new Queue($client, 'foobar'); 
+0

UPDATE:バージョン0.4.0以降、tarantool/queueには純粋なPHPクライアントが組み込まれています。 –

関連する問題