Download the PHP package colinmollenhour/credis without Composer

On this page you can find all versions of the php package colinmollenhour/credis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package credis

Build Status

Credis

Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance. This project was forked from one of the many redisent forks.

Getting Started

Credis_Client uses methods named the same as Redis commands, and translates return values to the appropriate PHP equivalents.

Redis error responses will be wrapped in a CredisException class and thrown.

Credis_Client also supports transparent command renaming. Write code using the original command names and the client will send the aliased commands to the server transparently. Specify the renamed commands using a prefix for md5, a callable function, individual aliases, or an array map of aliases. See "Redis Security":http://redis.io/topics/security for more info.

Contributing

Please be sure to add tests to cover and new or changed functionality and run the PHP-CS-Fixer to format the code.

Supported connection string formats

Unix socket connection string

unix:///path/to/redis.sock

TCP connection string

tcp://host[:port][/persistence_identifier]

TLS connection string

tls://host[:port][/persistence_identifier]

or

tlsv1.2://host[:port][/persistence_identifier]

Before php 7.2, tls:// only supports TLSv1.0, either ssl:// or tlsv1.2 can be used to force TLSv1.2 support.

Recent versions of redis do not support the protocols/cyphers that older versions of php default to, which may result in cryptic connection failures.

Enable transport level security (TLS)

Use TLS connection string tls://127.0.0.1:6379 instead of TCP connection tcp://127.0.0.1:6379 string in order to enable transport level security.

Clustering your servers

Credis also includes a way for developers to fully utilize the scalability of Redis cluster by using Credis_Cluster which is an adapter for the RedisCluster class from the Redis extension for PHP. This also works on AWS ElastiCatch clusters. This feature requires the PHP extension for its functionality. Here is an example how to set up a cluster:

Basic clustering example

The Credis_Cluster constructor can either take a cluster name (from redis.ini) or a seed of cluster nodes (An array of strings which can be hostnames or IP address, followed by ports). RedisCluster gets cluster information from one of the seeds at random, so we don't need to pass it all the nodes, and don't need to worry if new nodes are added to cluster. Many methods of Credis_Cluster are compatible with Credis_Client, but there are some differences.

Differences between the Credis_Client and Credis_Cluster classes

Note about tlsOptions for Credis_Cluster

Because of weirdness in the behaviour of the $tlsOptions parameter of Credis_Cluster, when a seed is defined with a URL that starts with tls:// or ssl://, if $tlsOptions is null, then it will still try to connect without TLS, and it will fail. This odd behaviour is because the connections to the nodes are gotten from the CLUSTER SLOTS command and those hostnames or IP address do not get prefixed with tls:// or ssl://, and it uses the existance of $tlsOptions array for determining which type of connection to make. If you need TLS connection, the $tlsOptions value MUST be either an empty array, or an array with values. If you want the connections to be made without TLS, then the $tlsOptions array MUST be null.

© 2011 Colin Mollenhour © 2009 Justin Poliey


All versions of credis with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package colinmollenhour/credis contains the following files

Loading the files please wait ....