how to add cassandra in yii2

hi

I want to use cassandra as my db in yii2 project , i know cassandra’s data modeling and concept of it but I dont know how to use it in yii2.

i use phpcassa (https://github.com/dmitriybelyy/yii2-cassandra-cql) and it work but its deprecated and datastax has made a new version of php cassandra driver in (https://github.com/datastax/php-driver).

I used it in a single php file and it work in cmd and netbeans but it does not show any data in browser with this error " Fatal error: Uncaught Error: Class ‘Cassandra’ not found in /var/www/html/test.php:78 Stack trace: #0 {main} thrown in /var/www/html/test.php on line 78"

my question is how to use newst version of cassandra created by data stax in "https://github.com/datastax/php-driver".

i dont know how to use it in yii2.

pls help me.

sos

How do you install it? I believe that adding it to the composer.json file will put under the vendor folder.

The "class not found" error sounds like a namespacing problem. Either a missing "use" statement at the top of your file, or instead of just calling "Cassandra::xxx" you need to let Yii know where it is "vendor/Cassandra/Casandra"

Just a thought.