Download the PHP package alfatraining/cassandra-session-handler-bundle without Composer
On this page you can find all versions of the php package alfatraining/cassandra-session-handler-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cassandra-session-handler-bundle
Cassandra Session Handler bundle
This Symfony 4 bundle provides a session handler for saving sessions in Cassandra.
Installation
-
Add the repository and requirement to
composer.json
: -
Install the bundle via
composer update
orcomposer update nothing
if you don't want updates. -
Register the bundle in
app/AppKernel.php
: -
Add configuration parameters to your
app/config/config.yml
(the following shows the bundle defaults) and activate the session handler: - Add parameters to
app/config/parameters.yml.dist
to configure the Cassandra cluster instance:
In Symfony 4, you can use an environnement variable which contains comma-separated values as a string :
Then run composer install
again or update your parameters.yml
by hand.
- Don't forget to actually create the keyspace and the column family. An example of the CQL that's needed can be found in
Resources/doc/create_session_keyspace_and_table.sql
inside this bundle.
As you can see in the Resources/config/services.yml
file you need to pass a Cassandra\Cluster
(it's an interface even if it doesn't like one) instance to the session handler upon instantiation. Because the DefaultCluster has a lot of configuration options (for SSL, authentication and a whole lot more – see http://datastax.github.io/php-driver/api/Cassandra/Cluster/class.Builder/ for more information) you may replace this class entirely and just instantiate your own custom cluster class instance. Here's how:
-
Replace the class name to use in your
app/config/config.yml
file: - Take a look at how the bundle's implementation works in
Lib/Cassandra/Cluster.php
.
All versions of cassandra-session-handler-bundle with dependencies
ext-cassandra Version >=1.4.0
datastax/php-driver Version ^1.4
symfony/framework-bundle Version ^4.2
psr/log Version ^1.0