PHPackages                             sinemacula/laravel-valkey-glide - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. sinemacula/laravel-valkey-glide

ActiveLibrary[Database &amp; ORM](/categories/database)

sinemacula/laravel-valkey-glide
===============================

Laravel Redis driver and adapter for Valkey GLIDE (ext-valkey\_glide).

0241[3 PRs](https://github.com/sinemacula/laravel-valkey-glide/pulls)PHPCI passing

Since Feb 22Pushed 2mo agoCompare

[ Source](https://github.com/sinemacula/laravel-valkey-glide)[ Packagist](https://packagist.org/packages/sinemacula/laravel-valkey-glide)[ RSS](/packages/sinemacula-laravel-valkey-glide/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Laravel Valkey GLIDE Driver
===========================

[](#laravel-valkey-glide-driver)

[![Latest Stable Version](https://camo.githubusercontent.com/b1f6b9185c4e1930e63817c34fe258cf17fa3102f573c32e3f02380331fb0c79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696e656d6163756c612f6c61726176656c2d76616c6b65792d676c6964652e737667)](https://packagist.org/packages/sinemacula/laravel-valkey-glide)[![Build Status](https://github.com/sinemacula/laravel-valkey-glide/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/sinemacula/laravel-valkey-glide/actions/workflows/tests.yml)[![Maintainability](https://camo.githubusercontent.com/f9752cda61da1db5327b2d8ec62c2a4358f532357d514ceefba40e8e61444a9c/68747470733a2f2f716c74792e73682f67682f73696e656d6163756c612f70726f6a656374732f6c61726176656c2d76616c6b65792d676c6964652f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/sinemacula/projects/laravel-valkey-glide/maintainability)[![Code Coverage](https://camo.githubusercontent.com/90804473e1638a21c8a3ae4d885830b86bfbeee0225cbdf9c8f15a85dc405f96/68747470733a2f2f716c74792e73682f67682f73696e656d6163756c612f70726f6a656374732f6c61726176656c2d76616c6b65792d676c6964652f636f7665726167652e737667)](https://qlty.sh/gh/sinemacula/projects/laravel-valkey-glide/coverage)[![Total Downloads](https://camo.githubusercontent.com/88dbb3392091081ddff37edf59b3bb792bacd8835fed5daefa1976d6d9f39d0b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696e656d6163756c612f6c61726176656c2d76616c6b65792d676c6964652e737667)](https://packagist.org/packages/sinemacula/laravel-valkey-glide)

Laravel Valkey GLIDE is a Laravel-native Redis integration for `ext-valkey_glide`.

It adds a `valkey-glide` Redis client driver to Laravel so cache, queue, session, and direct Redis usage can run through Valkey GLIDE using Laravel's existing Redis abstractions.

Purpose
-------

[](#purpose)

Managed Redis/Valkey platforms can drop sockets during maintenance, failover, scaling, or node replacement. This package integrates GLIDE into Laravel so reconnect behavior is handled at the client/connection layer rather than in application business code.

What Is Implemented
-------------------

[](#what-is-implemented)

- Service provider registration of the `valkey-glide` driver via `RedisManager::extend()`
- Connector implementing `Illuminate\Contracts\Redis\Connector`
- Connection wrapper extending `Illuminate\Redis\Connections\Connection`
- Laravel config normalization into GLIDE `connect()` arguments
- Optional single retry for idempotent commands on transient transport errors
- Key prefix compatibility for supported command families, including key-list handling for `MGET`
- Laravel compatibility fallback for phpredis-style `SET` and `EVAL` command argument shapes
- External test lane for extension and real Redis connectivity validation

Requirements
------------

[](#requirements)

- PHP `^8.3`
- Laravel components with `illuminate/redis` `^11.0 || ^12.0`
- `ext-valkey_glide` in runtime environments that use this driver

`ext-valkey_glide` is declared in `suggest` so this package can still be installed in environments that do not run the Valkey driver.

Installation
------------

[](#installation)

```
composer require sinemacula/laravel-valkey-glide
```

Laravel Configuration
---------------------

[](#laravel-configuration)

Set Redis client in your environment:

```
REDIS_CLIENT=valkey-glide
```

Example single-node Redis connection:

```
'redis' => [
    'client' => env('REDIS_CLIENT', 'valkey-glide'),

    'default' => [
        'host' => env('REDIS_HOST', '127.0.0.1'),
        'port' => (int) env('REDIS_PORT', 6379),
        'username' => env('REDIS_USERNAME'),
        'password' => env('REDIS_PASSWORD'),
        'database' => (int) env('REDIS_DB', 0),
        'name' => env('REDIS_CLIENT_NAME'),
        'prefix' => env('REDIS_PREFIX', ''),
        'tls' => env('REDIS_TLS', false),
    ],
],
```

Supported Config Mapping
------------------------

[](#supported-config-mapping)

The connector normalizes Laravel config into GLIDE connect arguments:

- `host` / `port` -&gt; `addresses`
- `addresses` (array) -&gt; `addresses`
- `tls` or `scheme=tls` -&gt; `use_tls=true`
- `username` + `password` -&gt; ACL credentials
- `iam` block -&gt; IAM credentials + `use_tls=true`
- `database` -&gt; `database_id`
- `name` -&gt; `client_name`

Cluster-style configs are normalized into seed `addresses` using `connectToCluster()`.

Runtime Behavior
----------------

[](#runtime-behavior)

Command execution goes through `ValkeyGlideConnection::command()`.

- Idempotent commands can retry once on recognized transient connection errors
- Non-idempotent commands are not retried
- Laravel command events are dispatched (`CommandExecuted`, `CommandFailed`)
- `executeRaw()` is supported via `rawcommand`
- Phpredis-style `SET`/`EVAL` argument shapes are normalized through `rawcommand`
- `disconnect()` delegates to GLIDE `close()`

Prefix Compatibility
--------------------

[](#prefix-compatibility)

Prefixing is handled in the connection wrapper for supported command families:

- single-key commands (`GET`, `SET`, `HGET`, etc.)
- all-key commands (`MGET`, `DEL`, etc.)
- two-key commands (`RENAME`, etc.)
- `EVAL` / `EVALSHA` key segments

Testing
-------

[](#testing)

Default tests (deterministic, no local Redis required):

```
composer test
```

Coverage report:

```
composer test-coverage
```

External extension/Redis tests:

```
composer test-external
```

Current external integration coverage includes:

- extension/client availability and connect/close behavior
- connector/connection roundtrip behavior and retry semantics
- command-prefix behavior, including list-style key commands (`MGET`)
- Laravel cache roundtrip behavior, physical key writes, locks, and TTL edge cases
- Laravel queue push/pop behavior and physical queue key writes
- Laravel session roundtrip behavior and physical session key writes

Optional env vars for external tests:

- `VALKEY_GLIDE_TEST_HOST`
- `VALKEY_GLIDE_TEST_PORT`
- `VALKEY_GLIDE_TEST_TLS`
- `VALKEY_GLIDE_TEST_USERNAME`
- `VALKEY_GLIDE_TEST_PASSWORD`

Development
-----------

[](#development)

```
composer install
composer format
composer check -- --all --no-cache --fix
composer test
```

Contributing
------------

[](#contributing)

Contributions are welcome via GitHub pull requests.

Security
--------

[](#security)

If you discover a security issue, please contact Sine Macula directly rather than opening a public issue.

License
-------

[](#license)

Licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance56

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6262ea965c244b0c946a2f29a94da05e30846c066a0b59399466216654c78fe6?d=identicon)[sinemacula](/maintainers/sinemacula)

---

Top Contributors

[![sinemacula-ben](https://avatars.githubusercontent.com/u/118753672?v=4)](https://github.com/sinemacula-ben "sinemacula-ben (5 commits)")

### Embed Badge

![Health badge](/badges/sinemacula-laravel-valkey-glide/health.svg)

```
[![Health](https://phpackages.com/badges/sinemacula-laravel-valkey-glide/health.svg)](https://phpackages.com/packages/sinemacula-laravel-valkey-glide)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
