Download the PHP package secretary/core without Composer

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

Secretary - Secrets Manager for PHP

Latest Stable Version Total Downloads

Secrets are an important aspect of most applications you can build. How you store them, and keep them "secret" is a challenge. Luckily, there are tools you can use to keep them all safe.

Secretary is a tool to integrate your PHP application with these tools.

Table of Contents

  1. Installation
  2. Api Documentation
    1. Secretary\Manager
      1. Initializing
      2. getSecret
      3. putSecret
      4. deleteSecret
      5. getAdapter
    2. Secretary\Secret
      1. getKey
      2. getValue

Installation

Choose the version you need
Version (X.Y.Z) PHP Symfony Comment
3.* >= 8.1.0 7.0 Current version
2.* >= 8.1.0 5.4, 6.0 Previous version
1.* >= 7.4.0 5.3 Previous version

By itself, the core is useless. You will also need to add at least one adapter:

Storage Engine Badges
AWS Secrets Manager Latest Stable Version Total Downloads
HashiCorp Vault Latest Stable Version Total Downloads
JSON File Latest Stable Version Total Downloads

There are also miscellaneous packages that add on to Secretary

Package Purpose Badges
PSR-6 Cache Adapter Allows for caching secrets using a PSR-6 Cache Interface Latest Stable Version Total Downloads
PSR-16 Cache Adapter Allows for caching secrets using a PSR-16 Cache Interface Latest Stable Version Total Downloads
Secretary Bundle Allows for integrating with the Symfony Framework Latest Stable Version Total Downloads

Api Documentation

There's two classes you interface with in Secretary:

Secretary\Manager

Secretary\Manager->__construct(AdapterInterface $adapter)

Pass in your desired adapter.

Optionally, you may wrap your adapter, with one of the two cache adapters.

For mor information on the arguments and options for the adapters, view their respective documentation.

Secretary\Manager->getSecret(string $key, ?array $options): Secret

Fetches a secret from the configured adapter. $key is the name of the secret (or path) you are trying to get.

Certain adapters will take custom options as well, like VersionId and VersionStage for the AWS SecretsManager Adapter

This will throw a Secretary\SecretNotFoundException if the secret cannot be found

Some adapters also support storing a key/value map as a secret's value.

Secretary\Manager->putSecret(string $key, string|array $value, ?array $options): void

Puts a secret with the given $value, into the storage engine, under the given $key.

If the current adapter doesn't support arrays, and you pass one it, it will throw a Secretary\ValueNotSupportedException.

Again, some adapters allow passing in custom options to send along with the request.

And for adapters that support a key/value map as a value:

Secretary\Manager->deleteSecret(string $key, ?array $options): void

Deletes a secret from the storage engine using the given $key.

Again, some adapters allow passing in custom options to send along with the request.

Secretary\Manager->getAdapter(): AdapterInterface

Will return the adapter that was passed to this manager during construction.

Secretary\Secret

This class implements ArrayAccess, so if your secret supports passing a key/value map, you can grab straight from the map:

Secrets are immutable, so attempting to change a value will throw an Exception.

Secretary\Secret->getKey(): string

Returns the key for the secret

Secretary\Secret->getValue(): string | array

Returns the value for the secret. If the secret is a key/value map, its an array


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
symfony/options-resolver Version ^5.4 || ^6.0 || ^7.0
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 secretary/core contains the following files

Loading the files please wait ....