Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Fake Chat Notifier

Fake Chat Notifier Laravel Package

symfony/fake-chat-notifier

Symfony Fake Chat Notifier provides a fake chat transport for the Symfony Notifier component, ideal for local development and automated tests. Simulate sending chat messages without hitting real providers, with predictable, inspectable behavior.

View on GitHub
Deep Wiki
Context7

Fake Chat (as email or log during development) Notifier Bridge.

Frequently asked questions about Fake Chat Notifier
How do I install symfony/fake-chat-notifier in a Laravel app?
Install it with Composer using composer require symfony/fake-chat-notifier. In a Laravel integration, bind the fake notifier service or provider in your app's service container and add the fake chat channel to the via() method of the notifications you want to simulate. Publish any package config if your integration provides it, then set FAKE_CHAT_DSN in .env.
How do I configure the fake chat DSN for email or logger output?
Use fakechat+email://default?to=TO&from=FROM for email output, replacing TO and FROM with development addresses. Use fakechat+logger://default to write messages to the logger instead. Put the chosen value in FAKE_CHAT_DSN and keep it limited to local or testing environments.
Does symfony/fake-chat-notifier support Laravel 8, 9, 10, and 11?
The package is a Symfony Notifier bridge, and the Laravel evaluation notes compatibility with Laravel 8+ on PHP 8.1+ when integrated through Laravel's container and notification system. Check the package and Symfony Notifier requirements for your exact Laravel and PHP versions before upgrading. In practice, newer Laravel releases should work if their Symfony dependencies are compatible.
How do I stop fake chat notifications from being used in production?
Gate the fake transport by environment, for example only binding it when app()->environment('local') or 'testing' is true. Add an explicit config flag such as fake-chat-notifier.enabled and keep it false in production. Never let the fake notifier override your real NotifierInterface binding outside development.
Can I use symfony/fake-chat-notifier with Laravel's Notification::fake() in tests?
Yes, you can combine it with Laravel's Notification::fake() when you want to assert Laravel-level notification dispatch. Use Notification::fake() for channel-level assertions and use the fake chat transport when you need inspectable email or log output. This helps keep CI tests deterministic without calling real chat providers.
How do I assert that a fake chat notification was sent or logged?
Assertions depend on the output channel: for logger use Laravel or Symfony log assertions around the configured fake chat logging channel, and for email inspect the mail transport or fake mailer used by the DSN. If you use Laravel Notification::fake(), assert the notification was sent to the expected notifiable and channel. The package is designed for predictable inspection rather than real delivery.
Can I add custom fake channels like Slack or Discord?
The native fake outputs are email and logger, so Slack, Discord, or custom API fakes require extension work. Implement or bind a custom fake channel behind the same notifier interface if your team needs provider-specific behavior. Keep custom fakes environment-gated just like the built-in email and logger transports.
What is the difference between fakechat+email and fakechat+logger DSNs?
fakechat+email sends the simulated chat message through an email transport to the TO address using the FROM address, which is useful for reading messages in a mail client or mail catcher. fakechat+logger writes the message to your application log, which is lighter for CI and local debugging. Choose email when you need realistic message formatting and logger when you need fast, inspectable output.
Do fake chat notifications hit real providers or external APIs?
No, the fake chat transport is intended to simulate sending without hitting real chat providers. The email DSN may use a configured mailer transport, so in development it can deliver to a local mail catcher or configured test mailbox rather than a real chat API. The logger DSN only writes to logs.
Is symfony/fake-chat-notifier maintained and what are the alternatives?
It is part of the Symfony Notifier ecosystem and follows Symfony's maintenance and contribution process, so review the repository and Symfony release notes for support status. Alternatives include Laravel Notification::fake(), custom fake notifier implementations, or provider-specific sandbox modes. Choose based on whether you need email/log inspection or full Laravel notification assertions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode