ywh / doctrine-encryption-bundle
ywh/doctrine-encryption-extension 与 Symfony2 的集成
1.0
2018-01-13 23:29 UTC
Requires
- php: >=5.5.9
- symfony/framework-bundle: ~2.7|~3.2|~4.0
- ywh/doctrine-encryption-extension: ^1.0
Requires (Dev)
- symfony/phpunit-bridge: ^4.0
- symfony/security-bundle: ^2.7 || ^3.2 || ^4.0
Suggests
- doctrine/doctrine-bundle: to use the ORM extensions
This package is not auto-updated.
Last update: 2024-09-24 04:40:31 UTC
README
此包为您的 Symfony2 项目提供了 DoctrineEncryptaionExtension 的集成。
许可证: MIT
安装
步骤 1: 下载包
打开命令行,进入您的项目目录,并执行以下命令以下载此包的最新稳定版本
$ composer require ywh/doctrine-encryption-bundle
此命令要求您已全局安装 Composer,请参阅 Composer 文档中的 安装章节。
步骤 2: 启用包
当使用 Flex 时,此步骤将自动处理。
然后,通过在您的项目的 app/AppKernel.php
文件中添加以下行来启用包
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new YWH\DoctrineEncryptionBundle\YWHDoctrineEncryptionBundle(), ); // ... } // ... }
步骤 3: 配置包
# app/config/config.yml ywh_doctrine_encryption: orm: ['default'] password: password key: ... # defuse_key
要生成密钥,请使用位于 vendor/bin/generate-defuse-key 的 generate-defuse-key
脚本。
$ vendor/bin/generate-defuse-key