Download the PHP package phil/console-bundle without Composer
On this page you can find all versions of the php package phil/console-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phil/console-bundle
More information about phil/console-bundle
Files in phil/console-bundle
Package console-bundle
Short Description Safer Symfony console commands: #[ForbidEnvironment] refusing a command in the listed kernel environments, #[ConfirmEnvironment] asking for the environment's name before it runs, --timestamps prefixing each output line with the time, --debug-phil printing the debug logs of chosen channels, a time and memory summary, and a lint of guarded commands
License MIT
Homepage https://ph-il.ca
Informations about the package console-bundle
phil/console-bundle
Safer Symfony console commands
phil/console-bundle guards the commands that must not run anywhere, or not without a second thought:
#[ForbidEnvironment('prod')] refuses a command in the listed kernel environments, and #[ConfirmEnvironment('prod')]
asks for the environment's name before it runs and refuses a non-interactive run unless --force-environment is given.
Every command gets --timestamps, which puts the time before each line it writes, and, with Monolog, --debug-phil,
which prints the debug logs of chosen channels. A summary of the command's duration, memory and exit code is written at
its end, and lint:console-guards lists the guarded commands. Nothing is kept between two commands: a long-running
process runs each one afresh.
Status
| Part | State |
|---|---|
#[ForbidEnvironment] and #[ConfirmEnvironment] on classes, __invoke() and method-level commands |
Implemented and tested |
--force-environment for non-interactive runs, exit code 77 on a refusal |
Implemented and tested |
--timestamps in ISO 8601 or relative to the start, or by configuration |
Implemented and tested |
--debug-phil with Monolog channels |
Implemented and tested |
| The duration and memory summary | Implemented and tested |
lint:console-guards as a table or JSON |
Implemented and tested |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, the bundle, worker mode. |
| Configuration | Every option, with an example. |
| Guarding commands | The two attributes, the confirmation, the exit code, the lint command. |
| Output | The timestamps, the debug logs, the summary. |
| Extension points | The debug switch, the memory gauge, the clock. |
| Testing | The bundle's tests and its benchmark. |
| Reference | Every class of the bundle. |
Quick start
Requirements
PHP 8.5 or later and Symfony 8.2 or later; Monolog for --debug-phil.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.
All versions of console-bundle with dependencies
psr/clock Version ^1.0
psr/container Version ^2.0
symfony/config Version ^8.2
symfony/console Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/event-dispatcher Version ^8.2
symfony/service-contracts Version ^3.6