Download the PHP package curology/envloader without Composer

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

envloader

CircleCI Status

Loads parameters from AWS SSM Parameter Store and uses them to generate a dotenv file.

Installation

You can install envloader via composer:

Usage

Configuration

Before you can use the envloader, you must create a json config file. By default, envloader will look for a file named envloader.json.

Example envloader.json:

The config file should contain the following entries:

Name Type Required Default Description
awsProfile String No default The AWS profile from your ~/.aws/config file that you wish to use. Alternatively, you can set the envloader-specific AWS environment variables AWS_SSM_ACCESS_KEY_ID and AWS_SSM_SECRET_ACCESS_KEY. If both the awsProfile and environment variables are unspecified, envloader will fall back to AWS's environment variables or default profile. The order of precedence is:
  1. AWS_SSM_ACCESS_KEY_ID and AWS_SSM_SECRET_ACCESS_KEY
  2. awsProfile, if specified and not set to the default profile
  3. The AWS environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  4. The default AWS profile from your ~/.aws/config
awsRegion String Yes - The AWS region that you would like fetch parameters from.
environment String No default The name of the environment that the generated dotenv file will be associated with.
envPath String No .env The relative path to the file where the generated dotenv file will be written.
envOverridePath String No - The relative path to the file containing the override values. Overrides will take precedence over parameters with the same name in AWS. You can also add values to the override file that do not appear in AWS and they will be added to the generated dotenv file.
workingDir String No getcwd() The working directory. envPath and envOverridePath are relative paths from the working directory.
parameterPrefix String No - The prefix to the names of your parameters in AWS.
parameterList Array Yes - The list of parameter names you would like to fetch from AWS. The parameter names should be in the form NAME:VERSION. If you provided a parameterPrefix, it should be removed form the beginning of the names in the parameterList.

Run

To list the commands available:

If you do not specify a path to your config file in the commands below, envloader will use envloader.json.

To generate your dotenv file:

To print the key, value pairs in your dotenv file in a formatted table:

Remove the --with-values option to hide the parameter values.

Testing

Setup

Install Composer Dependencies

Create AWS Resources

To enable tests that require real data, set the ENVLOADER_TEST_ENABLE_AWS environment variable to true:

If this variable is not set, the data-dependent tests will be skipped and you will not have to create any AWS resources.

To run all the tests, you will need real data in AWS SSM Parameter Store, and the required permissions to create the data. The following instructions use the AWS CLI (version 2.0.46 and above) - you can install it here. You can alternatively create the parameters via the AWS console UI.

  1. Create a user that will have permissions to edit and view the parameters

  2. Create an access key for the user. Keep track of the AccessKeyId and SecretAccessKey in the response.

  3. Add the AccessKeyId and SecretAccessKey from the response to your ~/.aws/credentials file, along with your aws region:

  4. Grant the user permissions to the SSM Parameters you will create.
    Open tests/command/setup/iam_policy.json and replace REGION and ACCOUNT_ID with the aws region and account ID where you will be creating the parameters.

  5. Create the SSM Parameters.

  6. The command tests use us-east-1 as the AWS region. You will have to change tests/fixtures/config/test_envloader_config.json to include the correct AWS region should you decide to use a different region.

Run

Unit Tests

Command Tests

All Tests

Cleanup

If you want to destroy the AWS resources created for testing, run the following commands:

  1. Delete the parameters.

  2. Delete the user policy

  3. Delete the access key. Replace AccessKeyId with the value from your ~/.aws/config

  4. Delete the user

All versions of envloader with dependencies

PHP Build Version
Package Version
Requires aws/aws-sdk-php Version ^3.171
vlucas/phpdotenv Version ^5.2
php Version ^8.0
symfony/console Version ^5.2
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 curology/envloader contains the following files

Loading the files please wait ....