kyletaylored / pantheon-secrets-manager
Pantheon Secrets Manager WordPress Plugin
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:wordpress-plugin
pkg:composer/kyletaylored/pantheon-secrets-manager
Requires
- php: >=8.2
- pantheon-systems/customer-secrets-php-sdk: ^1.0
Requires (Dev)
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