GithubHelp home page GithubHelp logo

yiisoft / db-redis Goto Github PK

View Code? Open in Web Editor NEW
17.0 20.0 10.0 112 KB

Yii DBAL Redis connection

Home Page: https://www.yiiframework.com/

License: BSD 3-Clause "New" or "Revised" License

PHP 100.00%
redis yii3 hacktoberfest db database optionalforframeworkannounce

db-redis's Introduction

Yii DBAL Redis connection


This extension provides the redis connection support for the Yii framework.

Latest Stable Version Total Downloads Scrutinizer Code Quality Code Coverage

Support version

PHP Redis Version CI-Actions
7.4 - 8.0 4 - 6 Build status Mutation testing badge static analysis type-coverage

Installation

The package could be installed via composer:

composer require yiisoft/db-redis

Configuration

Using yiisoft/composer-config-plugin automatically get the settings of EventDispatcherInterface::class and LoggerInterface::class.

Di-Container:

use Yiisoft\Db\Redis\Connection as RedisConnection;

return [
    RedisConnection::class => [
        '__class' => RedisConnection::class,
        'host()' => [$params['yiisoft/db-redis']['dsn']['host']],
        'port()' => [$params['yiisoft/db-redis']['dsn']['port']],
        'database()' => [$params['yiisoft/db-redis']['dsn']['database']],
        'password()' => [$params['yiisoft/db-redis']['password']]
    ]
];

Params.php

return [
    'yiisoft/db-redis' => [
        'dsn' => [
            'driver' => 'redis',
            'host' => '127.0.0.1',
            'database' => 0,
            'port' => 6379
        ],
        'password' => null,
    ]
];

Unit testing

The package is tested with PHPUnit. To run tests:

./vendor/bin/phpunit

Mutation testing

The package tests are checked with Infection mutation framework. To run it:

./vendor/bin/infection

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm

Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack

License

The Yii DBAL Redis connection is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

db-redis's People

Contributors

arogachev avatar dependabot[bot] avatar devanych avatar fantom409 avatar machour avatar rustamwin avatar samdark avatar sartor avatar siamskoi avatar terabytesoftw avatar vjik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

db-redis's Issues

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package yiisoft/yii-core could not be found in any version, there may be a typo in the package name.
  Problem 2
    - Installation request for yiisoft/yii-web ^3.0@dev -> satisfiable by yiisoft/yii-web[3.0.x-dev].
    - yiisoft/yii-web 3.0.x-dev requires psr/http-factory-implementation 1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package yiisoft/strings ^3.0@dev exists as yiisoft/strings[1.0.0, dev-bench_mb_str_starts_with, dev-master] but these are rejected by your constraint.
  Problem 2
    - The requested package yiisoft/yii-core could not be found in any version, there may be a typo in the package name.
  Problem 3
    - Installation request for yiisoft/active-record ^3.0@dev -> satisfiable by yiisoft/active-record[3.0.x-dev].
    - yiisoft/active-record 3.0.x-dev requires yiisoft/strings ^1.0 -> satisfiable by yiisoft/strings[1.0.0] but these conflict with your requirements or minimum-stability.
  Problem 4
    - Installation request for yiisoft/yii-web ^3.0@dev -> satisfiable by yiisoft/yii-web[3.0.x-dev].
    - yiisoft/yii-web 3.0.x-dev requires psr/http-factory-implementation 1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Port Yii2 to Yii3 questions.

This operative db-redis, connection and active-record I have the following proposals.

  • Leave this package only with the connection, like most db implementations, like db-sqlite for example.
  • Move the active-record from db-redis to yiisoft / active-record, so it is always guaranteed that the active-record is never broken, since all the tests will be executed there, they will be called RedisActiveRecord, RedisActiveQuery.
  • As for the cache and sessions, they can be left here or implemented in each package, in cache and sessions, and only the connection is injected, which is simple now.

@samdark @yiisoft/yii3

I await your comments.

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Installation request for yiisoft/yii-web ^3.0@dev -> satisfiable by yiisoft/yii-web[3.0.x-dev].
    - yiisoft/yii-web 3.0.x-dev requires psr/http-factory-implementation 1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Install failed

I can't install via composer, because it shows:


Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - yiisoft/db-redis dev-master requires yiisoft/yii-event ^3.0@dev -> found yiisoft/yii-event[dev-dependabot/github_actions/shivammathur/setup-php-2.11.0, dev-dependabot/github_actions/actions/cache-2.1.5, dev-master, 1.0.0] but it does not match the constraint.
    - yiisoft/db-redis 1.0.x-dev is an alias of yiisoft/db-redis dev-master and thus requires it to be installed too.
    - Root composer.json requires yiisoft/db-redis 1.0.x-dev -> satisfiable by yiisoft/db-redis[1.0.x-dev (alias of dev-master)].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Dependabot can't resolve your PHP dependency files

Dependabot can't resolve your PHP dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested package yiisoft/strings ^3.0@dev exists as yiisoft/strings[1.0.0, dev-master] but these are rejected by your constraint.
  Problem 2
    - The requested package yiisoft/yii-core could not be found in any version, there may be a typo in the package name.
  Problem 3
    - Installation request for yiisoft/active-record ^3.0@dev -> satisfiable by yiisoft/active-record[3.0.x-dev].
    - yiisoft/active-record 3.0.x-dev requires yiisoft/strings ^1.0 -> satisfiable by yiisoft/strings[1.0.0] but these conflict with your requirements or minimum-stability.
  Problem 4
    - Installation request for yiisoft/yii-web ^3.0@dev -> satisfiable by yiisoft/yii-web[3.0.x-dev].
    - yiisoft/yii-web 3.0.x-dev requires psr/http-factory-implementation 1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.