-
Notifications
You must be signed in to change notification settings - Fork 37
Description
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:
- Symfony:
[bin/console sentry:test](https://github.com/getsentry/sentry-symfony/blob/master/src/Command/SentryTestCommand.php) - Laravel:
[php artisan sentry:test](https://github.com/getsentry/sentry-laravel/blob/master/src/Sentry/Laravel/Console/TestCommand.php)
Proposed command:
./vendor/bin/typo3 sentry:testExpected behavior:
The command should:
- Check if the DSN is configured correctly
- Send a test exception/message to Sentry
- Display the event ID if successful
- 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! 🚀