PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Leonardo Di Sarli   PHP Redis Credential Manager   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Redis Credential Manager
Manage credentials stored in a Redis server
Author: By
Last change: php83 version
Date: 7 months ago
Size: 3,981 bytes
 

Contents

Class file image Download

PHP Credential Manager

Latest Version codecov CI Build Downloads Old Downloads PRs Welcome Packagist License (custom server)

PHP library for search credential in redis with Predis.

Installation

Release 7.0.0 Requires PHP 8.3

Release 6.0.0 Requires PHP 8.2

Release 5.0.0 Requires PHP 8.1

Release 4.0.0 Requires PHP 7.4

Release 3.0.0 Requires PHP 7.3

Release 2.0.0 Requires PHP 7.2

Release 1.0.0 Requires PHP 7.1

The recommended way to install is through Composer.

composer require not-empty/credential-manager-php-lib

Usage

Setting a credential

use CredentialManager\Credential;
$redisConfig = [
    'host' => 'localhost',
    'port' => 6379,
];
$credential = new Credential($redisConfig);
$credential->setCredential(
    'originName',
    'serviceName',
    'CredentialSample'
);
$getCredential = $credential->getCredential('originName', 'serviceName');
var_dump($getCredential);

if you want an environment to run or test it, you can build and install dependences like this

docker build --build-arg PHP_VERSION=8.3-rc-cli -t not-empty/credential-manager-php-lib:php83 -f contrib/Dockerfile .

Access the container

docker run -v ${PWD}/:/var/www/html -it not-empty/credential-manager-php-lib:php83 bash

Verify if all dependencies is installed

composer install --no-dev --prefer-dist

and run

php sample/credential-sample.php

Development

Want to contribute? Great!

The project using a simple code. Make a change in your file and be careful with your updates! Any new code will only be accepted with all validations.

To ensure that the entire project is fine:

First you need to building a correct environment to install all dependences

docker build --build-arg PHP_VERSION=8.3-rc-cli -t not-empty/credential-manager-php-lib:php83 -f contrib/Dockerfile .

Access the container

docker run -v ${PWD}/:/var/www/html -it not-empty/credential-manager-php-lib:php83 bash

Install all dependences

composer install --dev --prefer-dist

Run all validations

composer check

Not Empty Foundation - Free codes, full minds