Skip to content

T44 flavor commands - #57

Merged
niden merged 4 commits into
masterfrom
T44-flavor-commands
Oct 13, 2026
Merged

niden merged 4 commits into
masterfrom
T44-flavor-commands

Conversation

@niden

@niden niden commented Oct 13, 2026

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • composer test, composer cs and composer analyze all pass
  • I have created a PR for the documentation about this change, if user facing

  • Added flavors to the project commands: Crest\Command\ProjectCommand::flavors() declares them, and supports() is the rule. A command for a different flavor stops with an error that names the flavor. make:action, make:command, make:middleware, make:provider, make:responder, route:list, container:list and event:list are for ADR projects only.
  • Added Crest\Console\Registry::withDefault() and defaultName(): the command that the kernel runs when the user names none. Crest runs list.
  • Added an optional filter to Crest\Console\Registry::descriptions(): it keeps only the commands that pass it.
  • Added Crest\Project\Config::find(): the configuration of the project, or null when there is no crest.php. list reads the project with one walk up.
  • Changed the listing: in a project, crest and crest list show only the commands for the flavor of the project. crest --help shows the help of list. An unknown option with no command, and a crest.php that is not valid, stop the listing with an error.

Thanks

niden added 4 commits October 13, 2026 09:44
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
Assisted-by: Claude Code
@niden
niden requested a review from Jeckerson October 13, 2026 15:07
@niden niden self-assigned this Oct 13, 2026
@niden niden added the enhancement New feature or request label Oct 13, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Code Metrics Report

master (f62f8d0) #57 (7352deb) +/-
Coverage 99.5% 99.5% +0.0%
Test Execution Time 7s 5s -2s
Details
  |                     | master (f62f8d0) | #57 (7352deb) |  +/-  |
  |---------------------|------------------|---------------|-------|
+ | Coverage            |            99.5% |         99.5% | +0.0% |
  |   Files             |               63 |            63 |     0 |
  |   Lines             |             1602 |          1647 |   +45 |
+ |   Covered           |             1595 |          1640 |   +45 |
+ | Test Execution Time |               7s |            5s |   -2s |

Code coverage of files in pull request scope (99.2% → 99.2%, patch 100.0%)

Files Coverage +/- Patch Coverage Status
src/Command/Config/ShowCommand.php 100.0% 0.0% 100.0% modified
src/Command/Container/ListCommand.php 100.0% 0.0% 100.0% modified
src/Command/Event/ListCommand.php 96.8% +0.1% 100.0% modified
src/Command/ListCommand.php 100.0% 0.0% 100.0% modified
src/Command/Make/ActionCommand.php 100.0% 0.0% 100.0% modified
src/Command/Make/CommandCommand.php 100.0% 0.0% 100.0% modified
src/Command/Make/MiddlewareCommand.php 100.0% 0.0% 100.0% modified
src/Command/Make/NamedArtifactCommand.php 100.0% 0.0% - modified
src/Command/Make/ProviderCommand.php 100.0% 0.0% 100.0% modified
src/Command/Make/ResponderCommand.php 100.0% 0.0% 100.0% modified
src/Command/ProjectCommand.php 100.0% 0.0% 100.0% modified
src/Command/Route/ListCommand.php 95.1% +0.1% 100.0% modified
src/Command/Stub/PublishCommand.php 100.0% 0.0% 100.0% modified
src/Commands.php 100.0% 0.0% 100.0% modified
src/Console/Kernel.php 100.0% 0.0% 100.0% modified
src/Console/Registry.php 98.3% +0.1% 100.0% modified
src/Project/Config.php 100.0% 0.0% 100.0% modified

Reported by octocov

@niden
niden merged commit 58be8bd into master Oct 13, 2026
24 checks passed
@niden
niden deleted the T44-flavor-commands branch October 13, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant