Skip to content

Feature Request: Add CLI Test Command for Sentry Integration #120

@BreathCodeFlow

Description

@BreathCodeFlow

Is your feature request related to a problem?

Currently, there's no easy way to verify that the Sentry integration is working correctly from the command line in TYPO3. Developers need to either trigger an actual exception in the application or use workarounds like the userFunc example in the README to test if events are being sent to Sentry. This makes it harder to:

  • Quickly verify Sentry configuration during deployment
  • Test the connection to Sentry in CI/CD pipelines
  • Debug issues with DSN configuration or network connectivity
  • Ensure Sentry is working before going live

Describe the solution you'd like

Add a CLI command similar to what other major Sentry integrations provide:

Proposed command:

./vendor/bin/typo3 sentry:test

Expected behavior:

The command should:

  1. Check if the DSN is configured correctly
  2. Send a test exception/message to Sentry
  3. Display the event ID if successful
  4. Provide helpful error messages if something fails (e.g., missing DSN, network issues, SSL certificate problems)

Example output:

DSN configured: ✓
Sending test event to Sentry...
✓ Test event sent successfully!
Event ID: 1a2b3c4d5e6f7g8h9i0j

Check your Sentry dashboard: https://sentry.io/...

Why this would be valuable:

  • Developer Experience: Makes it super easy to verify the integration works
  • DevOps Friendly: Can be used in deployment scripts and health checks
  • Debugging: Helps isolate configuration issues vs. application issues
  • Industry Standard: Symfony and Laravel both have this - TYPO3 should too

Technical approach:

Since TYPO3 uses Symfony Console commands (as seen in the Configuration directory), the Symfony implementation would be an excellent starting point. It's already battle-tested and designed for the Symfony console interface that TYPO3 uses.

The command could be implemented as:

Classes/Command/SentryTestCommand.php

And registered in:

Configuration/Services.yaml

Additional context:

This feature would bring the TYPO3 Sentry integration on par with other major PHP frameworks and significantly improve the developer experience. It's a small addition that would provide immediate value to everyone using this extension.

I'd be happy to contribute to this if you're open to a PR! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions