Skip to content

feat: add ConsoleInputSerializer for console command arguments/options#1007

Merged
Litarnus merged 3 commits intogetsentry:masterfrom
sylfabre:console_input_serialiazer
Apr 1, 2026
Merged

feat: add ConsoleInputSerializer for console command arguments/options#1007
Litarnus merged 3 commits intogetsentry:masterfrom
sylfabre:console_input_serialiazer

Conversation

@sylfabre
Copy link
Copy Markdown
Contributor

…tions

Description

This PR adds a ConsoleInputSerializer to serialize console command arguments and options.

It can be used like this:

sentry:
  options:
    class_serializers:
      Symfony\Component\Console\Input\InputInterface: "Sentry\\Serializer\\ConsoleInputSerializer"

Issues

Copy link
Copy Markdown
Contributor

@Litarnus Litarnus left a comment

Choose a reason for hiding this comment

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

Looks good, can you add a small integration test to show that it properly resolves when added as serializer. Since we are not directly interacting with it, I think it would be good to have such a test so that it doesn't break silently if it ever gets renamed or moved or so

@sylfabre
Copy link
Copy Markdown
Contributor Author

@Litarnus done!

sylfabre and others added 3 commits March 30, 2026 22:20
Verifies that ConsoleInputSerializer is registered in the service container
and properly resolves as a Reference when configured as a class_serializer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sylfabre sylfabre force-pushed the console_input_serialiazer branch from 35ba2e8 to e2c7ded Compare March 30, 2026 20:20
@sylfabre
Copy link
Copy Markdown
Contributor Author

@Litarnus The CI is passing, but Warden: is there anything I can do here?

@Litarnus
Copy link
Copy Markdown
Contributor

Litarnus commented Apr 1, 2026

@sylfabre thanks for your contribution. Warden is not properly set up right now so we can just ignore this

@Litarnus Litarnus merged commit d3d399d into getsentry:master Apr 1, 2026
44 of 45 checks passed
@sylfabre sylfabre deleted the console_input_serialiazer branch April 1, 2026 13:31
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.

Serialize Symfony Console inputs by default

2 participants