componenta/app-console
Composer 安装命令:
composer require componenta/app-console
包简介
Console runtime integration for Componenta applications
README 文档
README
Console runtime integration for Componenta applications. The package connects componenta/app with Symfony Console, registers console boot targets, and provides a command registry that can be filled by application bootloaders.
Use this package when an application has CLI commands. It does not provide the base application kernel; that belongs to componenta/app.
Installation
composer require componenta/app-console
The package exposes Componenta\App\Console\ConfigProvider through Composer metadata, so componenta/composer-plugin can add it to the generated provider file.
Dependencies
The package requires PHP ^8.4, componenta/app, componenta/class-finder, componenta/config, componenta/error-handler, componenta/path-resolver, componenta/reflection, PSR-11, PSR-3, Symfony Console, Symfony EventDispatcher, and Symfony Lock.
Registered Services
ConfigProvider registers:
| Service or config key | Purpose |
|---|---|
ConsoleAppAdapter |
Creates a console application for Scope::CONSOLE. |
ConsoleBootTargetAdapter |
Adapts the console application to a boot target. |
ConsoleBootloader |
Boots console commands into the target registry. |
ConsoleCommandRegistryInterface |
Alias to ConsoleCommandRegistry. |
EventDispatcherFactoryInterface |
Factory for Symfony Console event dispatchers. |
Runtime Behavior
ConsoleBootloader runs in console scope. It allows the application boot process to register commands before Symfony Console executes input. Event listeners can observe command, error, termination, and signal events.
Public API
ConsoleCommandRegistryInterfacestores command definitions for the console application.ConsoleBootTargetInterfaceis the boot target for packages that want to add commands.InputFactoryInterface,OutputFactoryInterface, andIOFactoryadapt Symfony Console input and output.
Related Packages
componenta/appexplains scopes, adapters, and bootloaders.componenta/error-handlerprovides the error handling contracts used by console listeners.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-14