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

Pipeline Bundle Laravel Package

phphd/pipeline-bundle

A Symfony bundle for building reusable PHP pipelines with a clean, stage-based API. Chain processing steps, pass data through each stage, and organize complex workflows into testable, configurable components that fit naturally into Symfony applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit The release introduces #[NextForwarded], a PHP 8 attribute that declares a message's next forwarding target, plus phd_pipeline.forward_chain, a middleware alias that walks the resulting chain. This maps cleanly onto Laravel's existing Illuminate\Pipeline\Pipeline and the middleware-alias convention already used for HTTP kernels and queued job chains. Routing intent lives on the message class (declarative, colocated, discoverable via IDE "find usages") rather than in a config array or a switch statement — a pattern Laravel developers will already recognise from #[Route]-style attribute routing in other ecosystems. Net: strong conceptual fit, low conceptual surface area, no new runtime dependency implied by the note.

Integration feasibility The integration unit appears to be one alias registration plus one attribute per message DTO — genuinely small. Feasibility is high if three things hold, none of which the release note evidences: (1) the attribute is read from the message class rather than requiring a per-call registration; (2) chain resolution is bounded and rejects cycles at boot/compile time rather than at dispatch; (3) the middleware composes with dispatch(), Bus::chain(), and queue middleware without double-forwarding. Each is a verification task, not a design objection.

Technical risk

  • Cycle and fan-out amplification (high). "Chained forwarding" has no stated termination guarantee. A self-referencing or mutually-referencing #[NextForwarded] pair converts one inbound message into an unbounded queue/CPU loop. This is the single largest risk and needs an explicit cycle-detection answer plus a depth cap.
  • Reflection cost and Octane safety (medium). Attribute reads are reflection calls; under Octane/FrankenPHP long-running workers any attribute-to-class cache must be invalidated on deploy, or stale chains silently persist across reloads.
  • Silent no-op semantics (medium). If a message carries no attribute, does forwarding stop quietly, throw, or log? Undefined behaviour here is how messages vanish in production.
  • Maturity signal (medium). The package jumps to 1.0.0 with chained forwarding as the headline capability. A 1.0.0 semver claim plus a thin changelog suggests the API contract is asserted rather than battle-tested. Treat the version number as intent, not evidence.
  • Partial-chain failure (medium). No mention of retry, dead-letter, or idempotency semantics when hop N of a chain fails after hop N-1 succeeded.

Key questions

  1. Is chain depth bounded, and are cycles detected at boot or at dispatch?
  2. What happens to a message with zero #[NextForwarded] attributes — stop, throw, or log?
  3. Is the attribute repeatable (fan-out to N targets) or single-valued (linear chain only)?
  4. Where does the attribute→target map get cached, and is that cache Octane/reload-safe?
  5. How are exceptions and retries propagated across hops — per-hop retry, whole-chain retry, or fail-fast?
  6. Does forwarding re-enter the same pipeline (recursion) or start a fresh one?
  7. Ownership and support model for the phd_ namespace — internal team, vendor, or single maintainer?
  8. Laravel and PHP version constraints; is Illuminate\Pipeline a hard dependency or reimplemented?

Integration Approach

Stack fit Laravel (10/11/12 assumed, unverified) with PHP 8.1+ for attribute syntax. Compatible with queue-backed and synchronous pipelines, and with HTTP middleware if the package registers against the router kernel. If the team already uses Bus::chain() or job middleware for multi-step dispatch, this package largely replaces hand-rolled forwarding logic — a net reduction in bespoke code, which is the main argument for adoption.

Migration path Greenfield package with no prior assessment and no installed base, so migration is purely additive:

  1. Install and register phd_pipeline.forward_chain in the relevant pipeline/kernel configuration.
  2. Annotate exactly one low-risk message class with #[NextForwarded] behind a feature flag.
  3. Run it in shadow mode (compute the chain, log it, do not dispatch) against real traffic for one to two weeks and diff the resolved chain against the current manual forwarding path.
  4. Promote to canary on a single consumer, then widen class-by-class.
  5. Remove the legacy forwarding code only after the shadow diff is clean for a full release cycle.

Compatibility Unknown and must be pinned down before the spike: the package's laravel/framework and php constraints, whether attributes are resolved via ReflectionClass (cheap) or ReflectionMethod (broader but slower and more ambiguous), and whether the middleware alias name phd_pipeline.forward_chain is stable across patch releases. The dotted alias is unconventional for Laravel (which favours short snake_case keys) — confirm it is the documented public name and not an internal key that leaked into the changelog.

Sequencing Spike (2–3 days) → cycle/termination test harness → shadow mode → single-consumer canary → breadth → legacy decommission. Do not sequence breadth before the cycle-detection question is answered in writing; that one answer determines whether the rollout plan is viable at all.

Operational Impact

Maintenance Small, focused package — low ongoing maintenance burden and cheap to vendor or fork if the upstream stalls. Counterweight: a phd_-prefixed namespace with no stated maintainer, release cadence, or security policy. Pin to an exact version, commit the lockfile, and identify a named internal owner who can read the source before adopting across services.

Support Operational support hinges on the runbook, not the code. Required artefacts: a documented way to dump the resolved chain for a given message class, a clear statement of no-op versus throw behaviour, and a defined escalation path for the vendor/namespace. Support cost is low if the attribute map is introspectable; it becomes high if the only way to know a chain's shape is to read source.

Scaling Cost per message is roughly reflection on the message class plus O(chain length) hops. At low volume this is invisible; at high volume two effects matter — reflection lookups repeated per dispatch (mitigated only by caching, which reintroduces the Octane staleness risk), and queue amplification, where a chain of length k turns one inbound message into k jobs. Capacity planning must model k, not raw inbound rate. Backpressure on the chain's terminal hop propagates backwards through every preceding hop.

Failure modes

  • Cycle in the attribute graph → unbounded loop, worker saturation (highest severity).
  • Attribute absent or misspelled → message silently stops forwarding; no error surfaces.
  • Partial chain failure at hop N → earlier hops committed, later hops lost; no compensating action described.
  • Octane attribute cache stale after deploy → messages route on the previous release's chain.
  • Renaming or deleting a message class that appears as a #[NextForwarded] target → resolution failure at runtime, likely only on the affected branch.
  • Unbounded depth without a cap → slow, hard-to-attribute latency growth rather than a clean crash.

Ramp-up Low for anyone fluent in Laravel middleware and PHP 8 attributes — realistically half a day to first productive annotation, two to three days to be genuinely safe including the cycle/termination test harness. The learning cost is concentrated in the chain-resolution semantics and failure behaviour, not the API, which is a single attribute and a single alias. Budget the shadow-mode diff exercise as the real ramp-up activity; it is where the team converts "this looks convenient" into a defensible answer about whether chained forwarding reproduces the existing routing behaviour exactly.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package