Download the PHP package hongxunpan/simple-redis without Composer

On this page you can find all versions of the php package hongxunpan/simple-redis. 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 simple-redis

simple-redis

hongxunpan/simple-redis 为 hongxunpan/simple-framework 提供可按需安装、显式启用的 Redis 运行时集成。

本包负责:

本包不实现 Redis Manager,不包含 Event Driver,也不提供全局 redis() helper。 命名连接、延迟创建和底层 phpredis 适配由 hongxunpan/db 提供。

安装与启用

安装 Composer 包不会自动启用 Module。启用后,Provider 只构造并登记 Redis 实例, 不会立即建立网络连接;首次取得连接时才会连接 Redis。

默认配置

默认 Loader 读取 config('redis')。项目没有提供该配置时,使用包内安全模板:

配置只包含 Redis 连接信息。events.*、stream、consumer group 等事件运输参数不属于本包。 无参数调用固定使用保留连接名 default,因此标准配置必须包含该名称。

如需在项目侧生成可定制配置:

发布操作只创建不存在的 config/redis.php,不会覆盖项目已定制文件。

使用连接

推荐从容器取得实例:

旧静态入口会代理到同一实例:

取得缓存连接时不会隐藏执行 PING。需要主动重建时使用:

项目侧覆盖

redis.* 只是默认 Loader 的配置名称,不是 Module 强制业务契约。项目可以在 config('module.provider-override') 中登记自己的 Provider,然后覆盖:

示例:

项目 Provider 在 Module Provider 之后注册,RedisServiceProvider::boot() 会接管项目最终绑定的 Redis 实例。

配置边界

标准连接配置支持:

simple-redis 会拒绝未知配置键和旧式键名。旧 reserved、retryInterval、 readTimeout 等兼容转换只保留在 hongxunpan/db 的旧入口中,不进入新 Module 契约。

验证

测试覆盖 Module 元数据、标准配置校验、默认 Loader、项目配置覆盖、延迟连接和全局实例接管。


All versions of simple-redis with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-redis Version *
hongxunpan/db Version ^1.1
hongxunpan/simple-framework Version ^0.3
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 hongxunpan/simple-redis contains the following files

Loading the files please wait ...