Weave Code
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

Net Growl Laravel Package

pear/net_growl

PEAR Net_Growl is a PHP library for sending Growl desktop notification messages from your applications. It helps you format and dispatch alerts to Growl-enabled clients, enabling simple system-style notifications for events like errors, status changes, or updates.

View on GitHub
Deep Wiki
Context7

Getting Started

This package (pear/net_growl) is a legacy PEAR library for sending Growl notifications—macOS desktop alerts that were deprecated in 2012 (OS X 10.8+). Unless you’re actively maintaining a decade-old macOS-only system (e.g., legacy CI box still running Lion), do not use it. If you’re forced to:

  1. Install via PEAR (not Composer):
    pear install pear/pear    # if PEAR is missing
    pear config-set auto_discover 1
    pear install pear/Net_Growl
    
  2. Ensure Growl daemon is installed and running on the same macOS ≤10.7 machine.
  3. First minimal use:
    require_once 'Net/Growl.php';
    $growl = new Net_Growl('MyApp', ['MyNotification']);
    $growl->register(); // Must be called first!
    $growl->notify('MyNotification', 'Alert', 'Hello from PHP');
    

➡️ Reality check: On modern macOS, Linux, or Windows, this silently fails. For Laravel, skip this entirely—use Laravel’s native notifications with laravel-notification-channels/growl (which wraps terminal-notifier) or symfony/notifier.

Implementation Patterns

  • CLI-only usage: Only viable in local dev or legacy cron jobs on deprecated macOS. Wrap in try/catch—notifications will fail elsewhere:
    try {
        $growl->notify('MyNotification', $title, $message);
    } catch (Exception $e) {
        // Log but do not fail request
        Log::warning('Growl notification skipped', ['error' => $e->getMessage()]);
    }
    
  • No persistence: Each notify() is stateless—no connection pooling or batch sending.
  • App registration required: Always call register() before notify() with exact notification names. Mis-typed names cause silent drops.
  • Never in web requests: Avoid in HTTP kernels, controllers, or jobs—latency and platform fragility break UX.
  • Fallback to native alerts: For macOS dev environments, prefer exec("osascript -e 'display notification ...'") (modern, no Growl needed).

Gotchas and Tips

  • PEAR vs. Composer: Cannot be autoloaded by Composer. Manual require_once required—breaks Laravel’s PSR-4 flow.
  • Silent failures: Growl packets drop if app isn’t registered, port (9887) is blocked, or Growl daemon isn’t running—no reliable error reporting.
  • UTF-8 → garbled text: Growl uses MacRoman encoding internally. Non-ASCII chars (e.g., , , emojis) corrupt. Always test with sample content.
  • Security hazard: Growl protocol transmits credentials/messages in plaintext over the network. Never use on shared/untrusted networks.
  • Debugging:
    • On legacy macOS: Check Growl prefs → "Show All Notifications"; watch sudo tail -f /var/log/system.log | grep Growl.
    • Use tcpdump -i lo 'port 9887' to inspect packets.
  • Migration path:
    • Laravel 8+: Use laravel-notification-channels/growl (via terminal-notifier CLI)
    • Universal: symfony/notifier + macos transport or native AppleScript
    • Quick-and-dirty: exec("osascript -e 'display notification \"{$msg}\" with title \"{$title}\"'")
  • Final advice: If you find yourself needing this, ask: “Why are we still on macOS ≤10.7?” Audit your stack—this isn’t a code problem; it’s a tech debt emergency.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport