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

Filter Laravel Package

blessing/filter

blessing/filter is a Laravel package for organizing and applying query filters in a clean, reusable way. Define filters once, compose them with Eloquent queries, and keep controllers and models lean. Ideal for APIs and admin lists that need flexible, maintainable search. Simple to extend.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. blessing/filter is not a Laravel package in any meaningful sense — it is a small, framework-agnostic PHP library that implements a WordPress-style filter/hook registry (add_filter / apply_filters semantics), intended as the extension seam for a plugin system. The originating org (bs-community) is the Blessing Skin Server project, so the library was built to serve a specific application's plugin contract rather than a general-purpose ecosystem. For a Laravel codebase this is an architectural overlap, not a gap-filler: Laravel already ships a first-class event dispatcher (illuminate/events), Symfony's EventDispatcher, and pipeline primitives that cover the same ground with far stronger guarantees. Adopting this package means introducing a second, parallel extension mechanism alongside the framework's native one — a decision that needs a deliberate justification (e.g., a WordPress-compatible plugin contract, or a runtime filter chain with priority ordering that the native dispatcher does not express cleanly) rather than convenience.

Integration feasibility. Technically trivial to install (composer require blessing/filter), since it carries no framework coupling, no service provider, no facade, and no config surface. The real integration work is entirely on our side: writing a Laravel service provider, binding the filter registry as a singleton, deciding how it interacts with the container's scoped instances, defining a façade, and establishing conventions for where filters may be registered (bootstrap vs. per-request). Because the package exposes no Laravel-facing contract, there is no "supported" integration path to follow — we would be authoring the adapter and owning it forever.

Technical risk. This is the dominant concern and it is severe. The package has 0 stars, 0 dependents, and a composite score of 0.03, which places it in the effectively-unadopted tier: no downstream users to surface bugs, no community pressure to fix them, and no signal that it is maintained against modern PHP versions. Specific risks: (1) Bus factor of one — likely a single maintainer extracting an internal utility; abandonment or deletion is a live possibility, and a composer install from a repo that disappears breaks reproducible builds unless we vendor or fork. (2) Unverified quality posture — no evidence of CI, static analysis, or test coverage at the level we would demand of a dependency in the extension path of our own plugin system. (3) Semantic mismatch — WordPress-style filters are global, string-keyed, and untyped; in a Laravel codebase with strict typing, this invites magic-string coupling and makes refactors unsafe. (4) Naming/namespace ambiguity — blessing/filter is a generic name in a generic namespace, raising supply-chain and typo-squatting review questions. (5) Security surface — a plugin filter system is by definition a code-execution extension point; a lightly-audited implementation here sits directly on our trust boundary.

Key questions. What is the concrete capability we need that illuminate/events + Pipeline does not provide — priority-ordered mutation of scalar values, or WordPress plugin compatibility? Is there a maintained, adopted alternative (Symfony EventDispatcher, league/pipeline, illuminate/support's Pipeline) that satisfies the same requirement? What is the package's PHP version constraint and does it pass our static analysis baseline at the pinned version? Who is the maintainer, and is there a tagged release we can pin with a confidence level acceptable under our dependency policy? Would vendoring ~200 lines of filter logic into an internal namespace be cheaper than owning an adapter for an abandoned dependency?

Integration Approach

Stack fit. Poor-to-neutral as a direct dependency, acceptable as a pattern source. The filter-chain concept fits Laravel's request lifecycle and domain pipelines reasonably well — filters that transform a payload through ordered callbacks map onto Pipeline::through(). What does not fit is the global mutable registry: Laravel's container scoping, Octane's long-lived workers, and queue workers all assume state is reset or explicitly scoped. A process-global filter registry registered at boot is compatible with Octane only if registration is strictly read-only after boot; any runtime add_filter call becomes a cross-request leak. This constraint must be designed in from day one, not discovered in staging.

Migration path. Do not adopt as a greenfield dependency. Recommended path: (1) De-risk first — fork or vendor the source into an internal namespace (App\Support\Filters) with the original MIT license preserved, pinning the exact upstream commit for provenance. This converts an unmaintained transitive risk into owned code we can test and type. (2) Define our own contract — a FilterRegistry interface with typed method signatures; the vendored implementation sits behind it. (3) Bridge to Laravel — a service provider binding the registry as a singleton, a façade for ergonomics, and a documented rule that registration happens only in providers. (4) Deprecate the parallel mechanism over time if the native dispatcher proves sufficient, so we are not permanently maintaining two extension systems.

Compatibility. Verify the PHP constraint against our runtime matrix (8.1/8.2/8.3) before anything else; a package this old may declare ^7.x and rely on behavior deprecated in 8.x, or may lack return types that conflict with strict-mode autoloading. Check for namespace collisions with existing dependencies and confirm it pulls in nothing transitive. Confirm autoload PSR-4 compliance so it behaves under optimized Composer autoloading in production.

Sequencing.

  1. Discovery spike (1–2 days): read the source end-to-end, document the actual API surface versus the README, confirm license and release tags.
  2. Alternatives bake-off: implement the same sample extension point three ways — native Events, Pipeline, and the vendored filter registry — and compare on type safety, testability, and Octane safety.
  3. Decision gate: proceed only if the filter semantics are demonstrably required. Otherwise standardize on native primitives and close the ticket.
  4. Vendor + wrap: internal namespace, interface, provider, façade, unit tests covering priority ordering, removal, and idempotent registration.
  5. Pilot: one non-critical extension point, feature-flagged, shipped behind a config toggle.
  6. Generalize: publish internal conventions and only then expose the seam to plugin authors.

Operational Impact

Maintenance. Effectively total. With zero dependents and no visible maintainer activity, we should assume no upstream fixes arrive — including security fixes and PHP-version compatibility patches. Budget for periodic manual review of the vendored copy against upstream (if it still exists), and record the fork point so that a future diff is possible. The maintenance cost is small in absolute lines of code but non-zero in perpetuity, and it is a cost we would not bear if we used framework-native primitives.

Support. None. There is no vendor, no SLA, no issue-tracker responsiveness, and no community to consult. Internal engineers become the de facto maintainers and the only source of documentation. Any onboarding material must be written by us — the upstream README, judging by the description, is a one-line scope statement, not usage guidance.

Scaling. Runtime overhead is negligible: a filter registry is an in-memory map of string keys to callback arrays, with cost proportional to callbacks registered per key. The scaling concerns are architectural, not computational. (1) Unbounded registration — third-party plugins adding filters has no upper bound and no isolation; one plugin can register a filter on a hot path and degrade every request. (2) Octane/worker persistence — global registry state persists across requests under long-lived workers; memory growth from closures captured at runtime is a real leak vector. (3) Debugging at scale — string-keyed, untyped filters make it difficult to answer "what mutated this value?" in production; distributed tracing will not see inside a filter chain.

Failure modes.

  • Silent no-op: a filter registered under a misspelled key simply never fires; no error, no log. This is the single most likely production failure and the hardest to notice.
  • Ordering ambiguity: priority ties resolved implicitly by registration order produce non-deterministic behavior when plugins load in varying order (e.g., different Composer autoload or provider ordering).
  • Recursive filters: a filter that applies the same filter re-entrantly causes stack exhaustion; without a guard this is a hard crash on a request path.
  • Contract drift: filter callback signatures are conventionally untyped, so a plugin returning an unexpected type silently corrupts downstream data — with no static analysis to catch it.
  • Breakage on PHP upgrade: an unmaintained dependency is the most common blocker in a runtime upgrade; expect this to surface during the next major PHP migration and to require an emergency fork.
  • Supply-chain: an unattested, low-traffic repository is a plausible target for account compromise or namespace reuse; pin by commit hash and review the diff before any version bump.

Ramp-up. Low technical learning curve — the filter concept is familiar to anyone with WordPress or Symfony experience, and the API surface is small. The real ramp-up cost is organizational: engineers must learn our adapter conventions, the rule that registration is boot-time only, and the debugging playbook for silent no-ops. Expect half a day per engineer for the concept and one to two days of team-level effort to establish conventions, tests, and documentation that upstream does not provide. Given the 0.03 score and the availability of native equivalents, the honest recommendation is to treat this package as a reference implementation to study, not a dependency to ship — vendor the idea, not the package, unless the WordPress-compatibility requirement is explicit and funded.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
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