slim/flash
slim/flash adds flash messaging to Slim Framework applications, storing short-lived messages in the session so they survive a redirect and display once on the next request. It offers a simple PSR-7-friendly API, middleware integration, and multiple message levels.
slim/flash is a Slim 3 service provider, not a Laravel package. If the roadmap is Laravel, this is a non-option — session()->flash() and redirect()->with() are in the framework, maintained, and already paid for. The decision it actually supports is "confirm stack before shortlisting dependencies."$container['flash']). For an existing Slim 3 service, that's a defensible afternoon saved.getFirstMessage(), clearMessage() / clearMessages(), and a configurable storage key. This is evidence someone is still holding the door open, not evidence of a roadmap, security process, or support commitment. Planning should still treat flash messaging as an internal capability we own, with the library as an optional starting point.getFirstMessage() simplifies the common "show exactly one banner after redirect" pattern (single success notice, single blocking error) without index juggling in views. clearMessages() makes test setup and long-lived worker processes sane — you can reset notice state deterministically instead of reconstructing the container. A custom storage key lets two apps or two notice channels share a session without colliding, which is the difference between "usable in a multi-tenant admin" and "globally invasive."$container['flash'] usage — the storage key is configurable, implying the current default is preserved. Upgrade cost is a version bump plus a re-read of a very small diff.composer require. The release lowers the "is this dead?" probability slightly; it does not remove the ownership cost.Consider it only if:
$_SESSION handling.getFirstMessage()), deterministic resets in tests or long-running workers (clearMessages()), or a non-default session key to avoid collisions with other notice channels — these are the specific gaps 0.4.0 closes and the concrete reasons to take the new version over the old one.$container['flash']) rather than a helper class.Look elsewhere (or write it yourself) if:
For executives: This is a tiny, free utility for showing "your changes were saved" style notices after a page redirect. Three things matter. First, it's built for Slim, not Laravel — if our stack is Laravel we already have this behavior in the framework and should not add it. Second, there is a new release (0.4.0) with three small additions — retrieve the first pending notice, clear all notices at once, and configure which session key is used — none of which are breaking. That's a mildly positive maintenance signal after roughly eight years of silence, but it is not a support commitment or a roadmap. Third, essentially nothing depends on it, so it is a snippet, not a foundation. Recommendation: don't adopt it as a standing dependency. If a Slim service needs flash messages, budget a day to vendor or reimplement it so we own it outright — and if we do take it, pin the new version for the three conveniences it adds.
For engineering: It's a thin session-backed message store wired into Slim's container — set, get-and-clear, nothing more. MIT, no transitive weight, easy to read in one sitting. 0.4.0 adds getFirstMessage(), clearMessage() / clearMessages(), and a configurable storage key; these are additive and low-blast-radius, and the configurable key implies the default session key is unchanged, so existing call sites keep working. The cost isn't integration, it's ownership: still no Slim 4 alignment, and one release after eight years is not a cadence. If we take it, fork it into the repo, pin 0.4.0 or later, and add it to the dependency-review list — the bulk-clear and first-message helpers are worth having if we're maintaining the fork anyway, since they're the parts we'd otherwise write ourselves.
PM framing: Score flash messaging as a commodity capability with low strategic opportunity. The 0.4.0 features are quality-of-life improvements for implementers, not product capabilities — they make "show exactly one confirmation," "reset notices between tests," and "keep our notice channel separate from someone else's" easier, which means slightly less engineering time per flow and slightly fewer notice-rendering bugs. Spend product attention on the flows it unlocks — obvious post-submit confirmation, recoverable validation errors, clean multi-channel admin screens — and let engineering pick the cheapest safe implementation. Do not let a feature plan depend on this package's release schedule; one release in eight years is not a schedule.
How can I help you explore Laravel packages today?