switon/composer-extra
Composer 安装命令:
composer require switon/composer-extra
包简介
Cached Composer extra metadata reader for fast framework discovery at runtime for Switon Framework
README 文档
README
Switon's Composer plugin and runtime reader for cached extra metadata.
Highlights
- Cached package metadata: composer install and update keep one shared metadata cache current.
- Runtime access:
ComposerExtraInterfacereads discovery data without extra parsing. - Discovery support:
extra.switon.*can feed providers, commands, listeners, tasks, and jobs. - Automatic refresh: the Composer plugin keeps the cache fresh.
- Safe health checks: cache status can be checked without throwing.
Installation
composer require switon/composer-extra
Quick Start
use Switon\ComposerExtra\ComposerExtraInterface; use Switon\Core\Attribute\Autowired; final class PackageRegistry { #[Autowired] protected ComposerExtraInterface $composerExtra; public function listeners(): array { return $this->composerExtra->collect('switon.listeners'); } public function cacheHealth(): array { return $this->composerExtra->health(); } }
Docs: https://docs.switon.dev/latest/composer-extra
License
MIT.
统计信息
- 总下载量: 76
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 10
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-07