sherv/wp-di-container
最新稳定版本:v1.0.0
Composer 安装命令:
composer require sherv/wp-di-container
包简介
PSR-11 compliant dependency injection container for WordPress plugin development.
README 文档
README
A PSR-11 compliant dependency injection container for WordPress plugin development.
Requirements
- PHP 8.2+
- Composer
- WordPress (used within a WordPress plugin or theme)
Installation
composer require sherv/wp-di-container
Quick Start
use Sherv\Container\Container; $container = new Container(); // Bind an interface to a concrete implementation. $container->bind( Logger_Contract::class, File_Logger::class ); // Resolve. File_Logger and all its dependencies are built automatically. $logger = $container->make( Logger_Contract::class );
Documentation
- Introduction: Overview, features, and quick start.
- Architecture: Components overview and UML diagram.
- Container: Binding, resolving, singletons, extensions, and factory.
- Exceptions: Error handling reference.
Development
To get started, clone the repository and install dependencies:
git clone https://github.com/shervElmi/wp-di-container.git
cd wp-di-container
composer install
Scripts
| Command | Description |
|---|---|
composer test |
Run the test suite |
composer test:coverage |
Run tests with code coverage |
composer lint |
Run PHP CodeSniffer |
composer format |
Auto-fix coding standards violations |
Contributing
Contributions are welcome. Please open an issue or pull request on GitHub.
Security
To report a security vulnerability, please see SECURITY.md.
Changelog
See CHANGELOG.md for a history of notable changes.
License
© Sherv Elmi. Licensed under the MIT License. Distributed without any warranty. See the license for details.
统计信息
- 总下载量: 86
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-31