Download the PHP package talleu/php-redis-om without Composer

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

Build Status PHPStan Packagist Version GitHub codecov.io Code Coverage

php-redis-om ๐Ÿ—„๏ธ

A PHP object mapper for Redis.

An Object Mapper for Redisยฎ, designed to providing an intuitive and familiar interface for PHP developers to interact with Redis.

Features ๐Ÿ› ๏ธ

Requirements โš™๏ธ

Supported types โœ…

Installation ๐Ÿ“

Install the library via Composer:

Depending on your configuration, use phpredis or Predis

Symfony bundle ๐ŸŽต

In a Symfony application, you may need to add this line to config/bundles.php

And that's it, your installation is complete ! ๐Ÿš€

API Platform support ๐Ÿ•ท๏ธ

For API Platform users, a basic implementation is provided here: API Platfom X Redis

Basic Usage ๐ŸŽฏ

Add the RedisOm attribute to your class to map it to a Redis schema:

After add the RedisOm attribute to your class, you have to run the following command to create the Redis schema for your classes (default path is ./src):

For Symfony users:

For others PHP applications:

Then you can use the ObjectManager to persist your objects from Redis ! ๐Ÿ’ช

For Symfony users, just inject the RedisObjectManagerInterface in the constructor:

For others PHP applications:

๐Ÿฅณ Congratulations, your PHP object is now registered in Redis !

You can now retrieve your user wherever you like using the repository provided by the Object Manager (or the object manager directly):

Enum Support ๐Ÿท๏ธ

PHP backed enums are natively supported:

Search by enum value:

Range Queries ๐Ÿ”ข

Use MongoDB-style operators for numeric range searches:

Supported operators: $gte (>=), $gt (>), $lte (<=), $lt (<).

Note: Range queries work automatically with HASH format (NUMERIC index is auto-generated for int/float). For JSON format, you must explicitly declare a NUMERIC index: #[Property(index: ['age' => 'NUMERIC'])].

Pagination ๐Ÿ“„

Partial Updates (Merge) โšก

Instead of re-persisting the entire object, use merge() to only update changed fields:

For new objects (not loaded via find()), merge() falls back to a full persist().

Batch Reads (Pipeline) ๐Ÿš€

Load multiple objects by ID in a single Redis pipeline call:

GEO Queries ๐ŸŒ

Search objects within a geographic radius (requires a GEO-indexed property):

Unique Constraints ๐Ÿ”’

Enforce uniqueness on one or more fields using #[Unique].

Single field:

Composite (combination of fields must be unique):

flush() throws UniqueConstraintViolationException on conflict. Violations within the same flush() call are detected before hitting Redis. Concurrent writes are protected via Redis WATCH/MULTI/EXEC.

Bulk Operations โšก

Delete or update large numbers of objects without loading them into PHP memory.

bulkUpdate() throws BulkOperationException when $changes targets a #[Unique] field. Use stream() + merge() + flush() instead for those cases.

Streaming Large Collections ๐ŸŒŠ

findAll() loads everything into memory. stream() fetches objects in batches and yields them one by one, keeping memory bounded regardless of collection size.

Advanced documentation ๐Ÿ“š


All versions of php-redis-om with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
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 talleu/php-redis-om contains the following files

Loading the files please wait ...