getClient(); if (!$client) { $output->writeln('No client found'); $output->writeln('Your DSN is probably missing, check your configuration'); return 1; } $dsn = $client->getOptions()->getDsn(); if ($dsn) { $output->writeln('DSN correctly configured in the current client'); } else { $output->writeln('No DSN configured in the current client, please check your configuration'); $output->writeln('To debug further, try bin/console debug:config sentry'); return 1; } $output->writeln('Sending test message...'); $eventId = $currentHub->captureMessage('This is a test message from the Sentry bundle'); if ($eventId) { $output->writeln("Message sent successfully with ID $eventId"); } else { $output->writeln('Message not sent!'); $output->writeln('Check your DSN or your before_send callback if used'); return 1; } return 0; } }