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

Laravel Decorator Laravel Package

mindtwo/laravel-decorator

A lightweight decorator pattern implementation for Laravel. Wrap objects and services with reusable decorators to add behavior without modifying the original class, keep concerns separated, and resolve decorated instances cleanly through the container.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy: This is a small, single-purpose utility for the decorator pattern in Laravel. Adopting it avoids bespoke wrapper/plumbing code for cross-cutting behavior, keeping engineering effort on product features instead.
  • Architecture and roadmap: Informs whether extensibility concerns (caching, logging, feature flags, entitlements, metrics, A/B variants) should be layered via decorators around existing services rather than baked into core domain code.
  • Feature scoping and rollout: Decorators let you add or swap behavior per environment or per tenant without modifying the underlying service — useful for incremental releases, canary behavior, and graceful degradation.
  • Dependency hygiene: Release 3.0.4 is maintenance-only — it removes the committed composer.lock (correct practice for a library) and refreshes the package version and Laravel compatibility constraints. Net effect: lower upgrade friction and slightly broader framework support, a small positive for the "keep dependencies current" roadmap item. No new features or deprecations to plan around.

When to Consider This Package

  • You use Laravel's service container and want clean, testable decoration of bindings rather than ad-hoc subclassing.
  • You need cross-cutting concerns added around existing services without editing vendor or domain classes.
  • Your team is comfortable with the decorator pattern and wants a thin, focused dependency.
  • Look elsewhere if you need a full AOP/proxy framework, macro-based extension points, or event-driven alternatives; if long-term maintenance cadence is a hard requirement for a multi-year enterprise product; or if plain container bindings plus interfaces already cover the need.
  • Before adoption, verify your Laravel/PHP versions against the newly broadened compatibility constraints in 3.0.4, and confirm the package's release activity.

How to Pitch It (Stakeholders)

  • Executives: A tiny, low-risk utility dependency that lets us add behavior — caching, logging, entitlements, rollout variants — around existing features without rewrites. That means faster iteration and lower regression risk at negligible cost.
  • Engineering: Standard decorator pattern with Laravel container integration. Version 3.0.4 is housekeeping only — removed the committed composer.lock and refreshed the version and Laravel compatibility constraints. No API changes, no breaking changes, no migration work.
  • Caveat to flag: Confirm the supported Laravel/PHP matrix and the library's maintenance activity; treat it as a thin, replaceable layer so we are never locked in.
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.
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus