Skip to content

Migrate bin/openapi to Symfony Console#1977

Open
yceruto wants to merge 8 commits intozircote:masterfrom
yceruto:sf_console
Open

Migrate bin/openapi to Symfony Console#1977
yceruto wants to merge 8 commits intozircote:masterfrom
yceruto:sf_console

Conversation

@yceruto
Copy link

@yceruto yceruto commented Mar 14, 2026

Summary

Migrate bin/openapi from a 270-line standalone script with manual argument parsing to a Symfony Console application, leveraging modern Symfony 8.0 features:

  • #[AsCommand] attribute for command metadata
  • #[MapInput] with a GenerateInput DTO for declarative input definition
  • #[Argument] / #[Option] attributes on DTO properties
  • Invokable command __invoke()
  • Replace custom ConsoleLogger with Symfony's ConsoleLogger
  • Error handling via Symfony's console handler
  • SymfonyStyle for user-facing output (defaults, bootstrap info)

All existing CLI behavior is preserved (output format, exit codes, processor management, comma-separated exclude deprecation warning).

Type of Change

  • Refactor (no functional changes)

Related Issues

Part of #1953

@yceruto yceruto force-pushed the sf_console branch 4 times, most recently from b2fde19 to 3c34378 Compare March 14, 2026 19:37
Copy link
Collaborator

@DerManoMann DerManoMann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor bits, but looking very nice already!

@yceruto
Copy link
Author

yceruto commented Mar 16, 2026

It seems cs failures are unrelated to this changes

@DerManoMann
Copy link
Collaborator

DerManoMann commented Mar 17, 2026

Looks like I might need to update master with some changes for the latest cs-fixer :/

Edit: Although locally it passes - hmmm.

@DerManoMann
Copy link
Collaborator

Eh, its rector; trips me up every time!

@DerManoMann
Copy link
Collaborator

@yceruto I've updated master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants