Closed as not planned
Description
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"
}