Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[RFC] Move SECRETS in a new componentsπŸ“¦οΈΒ #44151

Closed as not planned
Closed as not planned
@casahugo

Description

@casahugo

Description

I really like the principle of symfony secrets, so much that I would like to use it with other frameworks.

In my case, I would like to use it with phalcon and php 7.1. The problem is that I don't need to have all the components of the FrameworkBundle.

I created a repository to extract the implementation of the symfony secrets. I just copied the code but it's not a viable long term alternative: https://github.com/casahugo/secrets

Thank you for your work.

Example

Create new repository symfony/secrets (or symfony/vault) in packagist to run the command

composer require symfony/secrets

Extract the files

β”œβ”€β”€ composer.json
β”œβ”€β”€ LICENSE
β”œβ”€β”€ phpunit.xml.dist
β”œβ”€β”€ README.md
β”œβ”€β”€ src
β”‚Β Β  β”œβ”€β”€ AbstractVault.php
β”‚Β Β  β”œβ”€β”€ Command
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SecretsDecryptToLocalCommand.php
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SecretsEncryptFromLocalCommand.php
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SecretsGenerateKeysCommand.php
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SecretsListCommand.php
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ SecretsRemoveCommand.php
β”‚Β Β  β”‚Β Β  └── SecretsSetCommand.php
β”‚Β Β  β”œβ”€β”€ DotenvVault.php
β”‚Β Β  └── SodiumVault.php
└── tests
    β”œβ”€β”€ DotenvVaultTest.php
    └── SodiumSecretTest.php

composer.json

{
    "name": "symfony/secrets",
    "license": "MIT",
    "require": {
        "php": ">=7.2.5",
        "paragonie/sodium_compat": "^1.17",
        "symfony/console": "^4|^5"
    },
    "require-dev": {
        "phpunit/phpunit": "^7.5.20",
        "symfony/dotenv": "^4|^5"
    },
    "autoload": {
        "psr-4": {
            "Symfony\\Secrets\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Symfony\\Secrets\\Tests\\": "tests/"
        }
    }
}

In https://github.com/symfony/framework-bundle edit composer.json to avoid a BCBreak.

...
"require": {
        ...
        "symfony/secrets": "~1.0"
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrameworkBundleRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions