Download the PHP package madeiramadeirabr/hagrid without Composer

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

Hagrid

Simplified integration with AWS Secrets Manager.

Getting Started

The purpose of this package is to simplify integration with AWS Secrets Manager, providing an easy way to retrive stored data.

All helpers considers that you have an role in EC2. This role must be allowed to access secrets manager. If EC2 doesn't has role to access SM, you need to create you own helpers using aws id and key to authenticate. All methods are explained here.

Prerequisites

Installing

Download the package using composer.

Basic Usage

Basic integration can be accomplished in three ways.

First Method: Raw Data Retrive

This way retrive the raw json from secrets manager. This is useful if you application need to manipulate environment variables before save it.

To do that, call secrets manager helper, as in the example below:

The response will be something like that:

Second Method: Create .env File

This method will verify if .env file exists, if it don't, it will be created from data retrived from secrets manager.

The response will be TRUE, if the file was created, and FALSE, if don't.

Third Method: Save data on environment

This method will read data from secrets manager and save using putenv.

This method doesn't have any response.

Use without helpers

If EC2 doesn't have role, you can instatiate SecretsManager and pass the the credentials to authenticate.

First Method

Instantiating the SecretsManager class and calling the setters.

Second Method

Instantiating the SecretsManager with AWS credentials.

And Finally

After using either of the two methods above, call the method that performs data recovery.

Response

The response of the method 'getSecretValue' will be something like this.

Authors

See also the list of contributors who participated in this project.


All versions of hagrid with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
aws/aws-sdk-php Version 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 madeiramadeirabr/hagrid contains the following files

Loading the files please wait ....