Active
Project:
Drupal core
Version:
main
Component:
CLI system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2026 at 00:58 UTC
Updated:
11 Oct 2026 at 00:21 UTC
Jump to comment: Most recent
From @larowlan comment on #3594336: Add a command to list modules and themes on a site, it may be a good idea to have a class/interface that uses OutputFormat enum so that it is extensible.
Should this implement an interface and then we type hint on that - it would allow [other thing] to ship its own output format?
Create an interface or class that makes use of OutputFormat so that specialized formats can be used by contrib for contrib use cases.
N/A
TBD
TBD
N/A
Comments
Comment #2
moshe weitzman commentedWe tentatively decided we would not provide an output format system as Drush did that for years and the Console community did not follow us. IMO its overengineering to provide extensible format names (and not the formatters themselves).
Comment #3
larowlanYeah I was thinking we'd make OutputFormat implement an interface and type hint that
And then add render output method to the interface and move the match from command to the enum
A new format is then a new enum that implements the interface
Enums are nice like that