kyletaylored/pantheon-secrets-manager
最新稳定版本:v0.0.2
Composer 安装命令:
composer require kyletaylored/pantheon-secrets-manager
包简介
Pantheon Secrets Manager WordPress Plugin
README 文档
README
The Pantheon Secrets Manager WordPress plugin provides an interface to manage secrets that are typically stored as hardcoded values or plaintext options.
Features
- Admin UI: Manage secrets directly from the WordPress dashboard.
- Pantheon Integration: Uses Pantheon’s Customer Secrets API.
- Secure Storage: Never stores secrets in the database.
- PHP Constants: Map secrets to PHP constants securely.
- WP-CLI Support: Manage secrets via the command line.
- Environment Aware: Handles different Pantheon environments (dev, test, live).
Requirements
- WordPress 6.0+
- PHP 8.2+
- Composer
Installation
Via Composer
composer require kyletaylored/pantheon-secrets-manager
Manual Installation
- Download the latest release zip.
- Upload to your WordPress plugins directory.
- Activate the plugin.
Usage
Navigate to the "Pantheon Secrets" menu in the WordPress admin dashboard to manage your secrets.
Development
Installation
For End Users (Production Sites)
- Download the latest release from the Releases page
- Upload the ZIP file via WordPress admin: Plugins → Add New → Upload Plugin
- Activate the plugin
Note: Release packages include all dependencies - no need to run composer install.
For Developers
- Clone the repository
- Run
composer install - Symlink or copy to your WordPress plugins directory
Configuration
Pre-commit Hooks
This project uses brainmaestro/composer-git-hooks to automatically run checks before committing.
- Linting:
phpcschecks for coding standard violations. - Testing:
phpunitruns the test suite.
If you need to bypass these checks (not recommended), you can use the --no-verify flag:
git commit -m "Your message" --no-verify
EditorConfig
This project includes an .editorconfig file to ensure consistent formatting across different editors:
- PHP files: Use tabs for indentation (WordPress standard)
- JSON/YAML files: Use 2 spaces
- Markdown files: Use 2 spaces
Most modern editors (VSCode, PHPStorm, Sublime Text, etc.) support EditorConfig automatically. If your editor doesn't, install the EditorConfig plugin.
IMPORTANT: Disable "format on save" for PHP files in your editor to prevent conflicts with WordPress Coding Standards:
VSCode: Add to your user or workspace settings.json:
{
"[php]": {
"editor.formatOnSave": false
}
}
PHPStorm: Go to Settings → Editor → Code Style → PHP → Set from... → Predefined Style → WordPress
Use composer fix to format PHP files according to WordPress standards.
Manual Commands
You can also run checks manually:
composer lint: Run PHPCS.composer fix: Run PHPCBF to fix formatting issues.composer test: Run PHPUnit.
### Testing
Run PHPUnit tests:
```bash
composer test
Run PHPCS:
composer lint
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-11-23