pinkfire/pinkfire-bundle
Symfony bundle that integrates Pinkfire with your application, providing configuration, service wiring, and convenience tooling so you can add Pinkfire capabilities with minimal setup. Install via Composer, enable the bundle, and adjust the provided options to fit your project.
First, a reality check that matters more than any setup step: this is a Symfony bundle, not a Laravel package. There is no service provider, no facade, no config/pinkfire.php. If you are on Laravel, there is nothing to install — the rest of this section assumes a legacy Symfony 2.x application, which is the only place this bundle ever worked.
Minimal steps on a Symfony 2.x app:
composer require pinkfire/pinkfire-bundle (expect this to fail on modern PHP/Symfony; see Gotchas).app/AppKernel.php — typically new Pinkfire\PinkfireBundle\PinkfireBundle() — inside the dev/staging if blocks only, never unconditionally.app/config/config_dev.yml. Check DependencyInjection/Configuration.php first; the exact key names in the README drift from the code in bundles this old.Where to look first, in order:
README.md for the intended wiring.DependencyInjection/Configuration.php — the authoritative list of config keys, not the docs.Resources/config/services.yml — the service ID of the client (something like pinkfire.client), which is the single object everything else hangs off.The first real use case is narrow: send a per-request profile payload from a shared dev or staging environment to a hosted viewer, so a teammate can inspect a request without SSHing into your box. That was the entire value proposition — a remote, shareable profiler. If that isn't your problem, you don't need this bundle; you need the Symfony profiler.
Automatic per-request profiling. The bundle's normal mode is a kernel event listener that serializes request/timing/query data and POSTs it at the end of the response. Turn this on only for the environments where you want it, via config_dev.yml / config_staging.yml. Do not enable it in prod or test — in test it will turn every functional test into an outbound HTTP call.
Manual instrumentation. The useful pattern is injecting the client service and bracketing a hot path:
$pinkfire->start('reindex');
// ... work ...
$pinkfire->stop('reindex');
This is how you profile a console command or a worker that never touches the kernel listener. Wrap it in a try/finally so a thrown exception doesn't leave an open timer.
Custom collectors. If the bundle exposes a collector tag (it mirrors Symfony's data-collector convention), register your own class with that tag to attach domain data — cache hit ratios, queue depth, third-party API timings — to the same payload. This is the only way to get anything out of it that the Symfony profiler doesn't already give you, and it's the strongest argument for a fork.
Environment-scoped configuration. The pattern that keeps this from becoming an incident:
# config_dev.yml
pinkfire:
enabled: true
api_key: "%pinkfire_key%"
with the key sourced from parameters.yml/env, never committed. In config_prod.yml, either omit the block entirely or set enabled: false.
Integration tip — run it beside the local profiler, not instead of it. Keep Symfony's web debug toolbar for interactive debugging; use Pinkfire only for the "someone else's request, on another machine" case. Trying to replace the profiler with a network round-trip is a strict downgrade.
If you're on Laravel anyway: the only viable pattern is a thin adapter — bind the bundle's client class in a service provider, add a terminable middleware that starts/stops it around the request, and let it fail silently. That is a day of work to recreate a feature laravel/telescope already ships.
curl the endpoint by hand with the same key.Cookie/Authorization and parameterize before it leaves the process — or don't send it.Configuration.php disagree in bundles this old. Trust the code; run app/console config:dump-reference pinkfire to see what's actually accepted.spatie/laravel-ray/Clockwork equivalents.Bottom line for day-to-day leverage: for a modern Laravel or Symfony codebase, this is zero — the honest assessment is that you should use the Symfony Profiler, Laravel Telescope, or Blackfire/Tideways instead. The bundle is worth reading only as a reference for how to structure a request-level data collector and a decorator-based transport, which is a pattern you can reimplement in an afternoon without the dead service dependency.
How can I help you explore Laravel packages today?