mannew/hipchat-bundle
mannew/hipchat-bundle is a Symfony bundle for integrating HipChat messaging into PHP applications. It offers straightforward configuration and service wiring for sending room notifications, helping teams connect their apps to HipChat with minimal setup.
This bundle is a thin Symfony DI wrapper around the HipChat REST client — there is no business logic here, just a service definition plus a config tree. The mental model is "one configured HipChat client object, injected wherever you need it." As of 1.4 it also ships console commands, but only if you opt into symfony/console.
Minimal steps:
composer require mannew/hipchat-bundle — 1.4 opens the constraints to Symfony 3, so this now resolves on both Symfony 2.x and 3.x apps (not 4+; see Gotchas).app/AppKernel.php: new ManneW\HipChatBundle\ManneW\HipChatBundle(). Check the bundle class namespace against vendor/mannew/hipchat-bundle/ — old bundles often nest namespaces and the README examples are the fastest way to confirm it.config.yml:manne_w_hipchat:
token: "%hipchat_token%"
# auth_type: token # if exposed by the config tree
symfony/console is installed (1.4 only suggests it) and run php app/console list filtered for hipchat to discover the exact command names before scripting anything against them.php app/console container:debug | grep -i hipchat — that is the single most useful debugging step with an unmaintained bundle like this.First use case: a deploy/CI notification. Fetch the client, call getRoom('Engineering') or getRoomById($id), then ->message('Deploy finished: ' . $tag)->send(). That one flow exercises config, container wiring, and the HTTP layer all at once, so it is the right smoke test. If you installed symfony/console, the bundled HipChat commands are an even cheaper smoke test — they exercise the same client without you writing a line of app code, which is a good way to confirm your token and room ids are valid before wiring anything into a deploy hook.
Where to look first: the bundle's DependencyInjection/ directory (config keys and service id), then its Resources/config/services.yml (exact service name and any injected parameters). The wrapper itself is trivial; the underlying HipChat client's method names (e.g. getRoom, getUser, message) are what you will actually spend time in. With 1.4, also glance at the Command/ directory — it tells you which client methods the maintainers considered important enough to expose.
App\Notifier\HipChatNotifier) that depends on the client and exposes intent-named methods (notifyDeploy, notifyAlert). This gives you one place to swap the package out later — which, given the project's trajectory, you should plan for.kernel.terminate, console.terminate) and dispatch a HipChat message from the listener. Do it on terminate so the HTTP round-trip to HipChat never delays the response to the user.severity => room_id and route in your notifier service. This keeps the call sites clean and lets ops reconfigure rooms without a code change./notification style mentions. Wrap message construction in a small formatter so @here and room mentions stay consistent and testable.@throws-free by design. This applies equally to the bundled commands if you schedule them.HipChatNotifier in application tests rather than the bundle's service. If you need to test the wrapper interaction itself, the client is constructed from a token, so you can substitute a stub client without touching HTTP.services.yaml _defaults, no autowiring in the bundle's own service definition. On Symfony 3.3+ you can still autowire the client by its class name in your own services.yml if you prefer that over remembering the service id. On Symfony 4+ you will be registering services manually or writing your own wrapper.symfony/console is only suggested, not required. The commands silently won't be there if you don't have it installed, and you can get odd failures if console is present at a version incompatible with your Symfony line. If the hipchat commands don't appear in app/console list, check this before assuming the bundle is broken.composer why-not before debugging anything else.container:debug; do not trust the README.config_test.yml or guard the notifier so the client is never instantiated in tests. The console commands make this more visible: a missing token will now blow up at command boot, not just at send time.vendor/ — you will lose changes and there is no upstream to send a PR to.How can I help you explore Laravel packages today?